<Compile Include="Data\PersistedConfiguration.cs" />
<Compile Include="Data\DisplayNameAttribute.cs" />
<Compile Include="Subsystems\JsonGenerator.cs" />
+ <Compile Include="Subsystems\Snapshot.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="VS_libs\" />
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <Compile Include="Subsystems\Snapshot.cs" />
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
using System.Threading;
using System.Threading.Tasks;
using Hjg.Pngcs;
+using Hjg.Pngcs.Chunks;
namespace Automap
{
ImageInfo info = new ImageInfo(Width * chunkSize, Height * chunkSize, 8, false);
PngWriter snapWriter = FileHelper.CreatePngWriter(path, info, true);
+ PngMetadata meta = snapWriter.GetMetadata( );
+ meta.SetTimeNow( );
+ var transparencyChunk = meta.CreateTRNSChunk( );
+ transparencyChunk.SetRGB(0, 0, 0);
+ //meta.SetText("Center_X", coord.X.ToString("D"));
+ //meta.SetText("Center_Y", coord.Y.ToString("D"));
+
+
+
+ /*
+ Red: 2 bytes, range 0 .. (2^bitdepth)-1
+ Green: 2 bytes, range 0 .. (2^bitdepth)-1
+ Blue: 2 bytes, range 0 .. (2^bitdepth)-1
+ */
+
+
snapWriter.CompLevel = 5;
snapWriter.CompressionStrategy = Hjg.Pngcs.Zlib.EDeflateCompressStrategy.Filtered;
+
+
var orderedList =
from ch in cols
group ch by ch.Location.Y into g