Changeset 11661
- Timestamp:
- 12/05/14 08:36:01 (10 years ago)
- Location:
- branches/FitnessLandscapeAnalysis/HeuristicLab.Analysis.FitnessLandscape
- Files:
-
- 2 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 } -
branches/FitnessLandscapeAnalysis/HeuristicLab.Analysis.FitnessLandscape/HeuristicLab.Analysis.FitnessLandscape.csproj
r11626 r11661 152 152 <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Selection-3.3.dll</HintPath> 153 153 </Reference> 154 <Reference Include="ICSharpCode.SharpZipLib, Version=0.85.4.369, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">155 <SpecificVersion>False</SpecificVersion>156 <HintPath>..\..\..\trunk\sources\bin\ICSharpCode.SharpZipLib.dll</HintPath>157 </Reference>158 154 <Reference Include="System" /> 159 155 <Reference Include="System.Core"> … … 161 157 </Reference> 162 158 <Reference Include="System.Drawing" /> 159 <Reference Include="System.IO.Compression" /> 163 160 <Reference Include="System.Windows.Forms" /> 164 161 <Reference Include="System.Windows.Forms.DataVisualization" />
Note: See TracChangeset
for help on using the changeset viewer.