clearer test_apng log

This commit is contained in:
andri lim 2020-04-14 21:49:02 +07:00
parent 931cebf99c
commit c48bebb901
No known key found for this signature in database
GPG Key ID: 31702AE10541E6B9

View File

@ -25,14 +25,11 @@ proc toBMP(png: PNGResult, fileName: string) =
bmp.data[px + 2] = chr(uint8(255) + uint8((((x.data[px4 + 0].uint - 255'u) * alpha) shr 8) and 0xFF))
let bmpName = fileName & "_" & $frame & ".bmp"
#var s = newFileStream(bmpName, fmWrite)
#s.write(bmp)
#s.close()
let data1 = bmp.write()
let data2 = readFile(bmpName)
assert data1 == data2
echo "frame $1 of $2" % [$(frame + 1), $png.frames.len]
echo "frame $1 of $2 vs. $3" % [$(frame + 1), $png.frames.len, bmpName]
inc frame