Changeset 11661 for branches/FitnessLandscapeAnalysis/HeuristicLab.Analysis.FitnessLandscape/BoxChart
- Timestamp:
- 12/05/14 08:36:01 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/FitnessLandscapeAnalysis/HeuristicLab.Analysis.FitnessLandscape/BoxChart/BoxChartCreator.cs
r8172 r11661 4 4 using System.Drawing.Imaging; 5 5 using System.IO; 6 using System.IO.Compression; 6 7 using System.Linq; 7 8 using HeuristicLab.Collections; … … 12 13 using HeuristicLab.Parameters; 13 14 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 14 using ICSharpCode.SharpZipLib.Zip;15 15 16 16 namespace HeuristicLab.Analysis.FitnessLandscape.BoxCharts { … … 155 155 filename = string.Format("{0}.zip", filename); 156 156 using (var stream = File.Create(filename)) { 157 using (var zip Stream = new ZipOutputStream(stream)) {157 using (var zipArchive = new ZipArchive(stream, ZipArchiveMode.Create)) { 158 158 foreach (var bitmap in bitmaps) { 159 zipStream.PutNextEntry(new ZipEntry(bitmap.Key) { DateTime = DateTime.Now });160 using (var s = new MemoryStream()) {159 var entry = zipArchive.CreateEntry(bitmap.Key); 160 using (var s = entry.Open()) { 161 161 bitmap.Value.Save(s, ImageFormat.Png); 162 zipStream.Write(s.ToArray(), 0, (int)s.Length);163 162 } 164 163 } … … 166 165 } 167 166 } 168 169 167 #endregion 170 171 168 } 172 169 }
Note: See TracChangeset
for help on using the changeset viewer.