Skip to content

Commit 81822bb

Browse files
committed
fix the unpredicted size
1 parent 9fc17c9 commit 81822bb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Src/PngDecoder/PNGDecode.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public byte[] DecodeImageData()
6464
return result;
6565
}
6666

67-
ZLibStream GetFilteredRawStream2()
67+
// TODO write own ZLib to minimize foot-print even more
6868
{
6969
var result = new MemoryStream();
7070
foreach (var chunk in _chunks.Where(a => a.Signature == PngChunkType.IDAT))
@@ -73,7 +73,7 @@ ZLibStream GetFilteredRawStream2()
7373
try
7474
{
7575
chunk.GetData(data);
76-
result.Write(data);
76+
result.Write(data, 0, (int)chunk.Length);
7777
}
7878
finally
7979
{

0 commit comments

Comments
 (0)