mirror of
https://github.com/status-im/nimPNG.git
synced 2025-01-30 14:24:49 +00:00
commit
11bb17bffd
@ -3,7 +3,7 @@ Portable Network Graphics Encoder and Decoder written in Nim store lossless imag
|
||||
Since version 0.2.0 also support Animated PNG!
|
||||
|
||||
[![Build Status (Travis)](https://img.shields.io/travis/jangko/nimPNG/master.svg?label=Linux%20/%20macOS "Linux/macOS build status (Travis)")](https://travis-ci.org/jangko/nimPNG)
|
||||
[![Windows build status (Appveyor)](https://img.shields.io/appveyor/ci/jangko/nimPNG/master.svg?label=Windows "Windows build status (Appveyor)")](https://ci.appveyor.com/project/jangko/nimPNG)
|
||||
[![Build status](https://ci.appveyor.com/api/projects/status/7ap5r5a41t7ea04p?svg=true)](https://ci.appveyor.com/project/jangko/nimpng)
|
||||
![nimble](https://img.shields.io/badge/available%20on-nimble-yellow.svg?style=flat-square)
|
||||
![license](https://img.shields.io/github/license/citycide/cascade.svg?style=flat-square)
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user