• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Automap (client) [VS plugin mod]


Commit MetaInfo

Revision84763f54eb025caac874ae5ae57f23a808cc1e8a (tree)
Time2020-06-04 06:58:59
Authormelchior <melchior@user...>
Commitermelchior

Log Message

Updates for Snapshots branch, Transparency setting

Change Summary

Incremental Difference

--- a/Automap/Automap.csproj
+++ b/Automap/Automap.csproj
@@ -97,6 +97,7 @@
9797 <Compile Include="Data\PersistedConfiguration.cs" />
9898 <Compile Include="Data\DisplayNameAttribute.cs" />
9999 <Compile Include="Subsystems\JsonGenerator.cs" />
100+ <Compile Include="Subsystems\Snapshot.cs" />
100101 </ItemGroup>
101102 <ItemGroup>
102103 <Folder Include="VS_libs\" />
@@ -116,6 +117,5 @@
116117 <CopyToOutputDirectory>Always</CopyToOutputDirectory>
117118 </None>
118119 </ItemGroup>
119- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
120- <Compile Include="Subsystems\Snapshot.cs" />
120+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
121121 </Project>
\ No newline at end of file
--- a/Automap/Subsystems/Snapshot.cs
+++ b/Automap/Subsystems/Snapshot.cs
@@ -6,6 +6,7 @@ using System.Linq;
66 using System.Threading;
77 using System.Threading.Tasks;
88 using Hjg.Pngcs;
9+using Hjg.Pngcs.Chunks;
910
1011 namespace Automap
1112 {
@@ -43,9 +44,27 @@ namespace Automap
4344
4445 ImageInfo info = new ImageInfo(Width * chunkSize, Height * chunkSize, 8, false);
4546 PngWriter snapWriter = FileHelper.CreatePngWriter(path, info, true);
47+ PngMetadata meta = snapWriter.GetMetadata( );
48+ meta.SetTimeNow( );
49+ var transparencyChunk = meta.CreateTRNSChunk( );
50+ transparencyChunk.SetRGB(0, 0, 0);
51+ //meta.SetText("Center_X", coord.X.ToString("D"));
52+ //meta.SetText("Center_Y", coord.Y.ToString("D"));
53+
54+
55+
56+ /*
57+ Red: 2 bytes, range 0 .. (2^bitdepth)-1
58+ Green: 2 bytes, range 0 .. (2^bitdepth)-1
59+ Blue: 2 bytes, range 0 .. (2^bitdepth)-1
60+ */
61+
62+
4663 snapWriter.CompLevel = 5;
4764 snapWriter.CompressionStrategy = Hjg.Pngcs.Zlib.EDeflateCompressStrategy.Filtered;
4865
66+
67+
4968 var orderedList =
5069 from ch in cols
5170 group ch by ch.Location.Y into g