Merge pull request #41 from jangko/fix_readme

fix appveyor badge
This commit is contained in:
andri lim 2020-04-14 22:53:47 +07:00 committed by GitHub
commit 11bb17bffd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 5 deletions

View File

@ -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)

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