mirror of
https://github.com/status-im/nimPNG.git
synced 2025-02-16 22:46:35 +00:00
minor update
This commit is contained in:
parent
b53562a281
commit
44347c05c0
@ -25,9 +25,9 @@
|
|||||||
# part of nimPDF sister projects
|
# part of nimPDF sister projects
|
||||||
#-------------------------------------
|
#-------------------------------------
|
||||||
|
|
||||||
import streams, endians, tables, hashes, math, nimz
|
import streams, endians, tables, hashes, math
|
||||||
|
|
||||||
import private.buffer
|
import private.buffer, private.nimz
|
||||||
|
|
||||||
const
|
const
|
||||||
NIM_PNG_VERSION = "0.1.8"
|
NIM_PNG_VERSION = "0.1.8"
|
||||||
@ -769,7 +769,7 @@ proc createChunk(png: PNG, chunkType: PNGChunkType, data: string, crc: uint32):
|
|||||||
|
|
||||||
if result != nil:
|
if result != nil:
|
||||||
result.initChunk(chunkType, data, crc)
|
result.initChunk(chunkType, data, crc)
|
||||||
|
|
||||||
proc makePNGDecoder*(): PNGDecoder =
|
proc makePNGDecoder*(): PNGDecoder =
|
||||||
var s: PNGDecoder
|
var s: PNGDecoder
|
||||||
new(s)
|
new(s)
|
||||||
|
@ -1014,8 +1014,8 @@ proc testAutoColorModels() =
|
|||||||
|
|
||||||
proc testFilter() =
|
proc testFilter() =
|
||||||
echo "test Filter"
|
echo "test Filter"
|
||||||
let input = "tester" & DirSep & "tfilter.png"
|
let input = "tfilter.png"
|
||||||
let temp = "tester" & DirSep & "temp.png"
|
let temp = "temp.png"
|
||||||
let png = loadPNG32(input)
|
let png = loadPNG32(input)
|
||||||
discard savePNG32(temp, png.data, png.width, png.height)
|
discard savePNG32(temp, png.data, png.width, png.height)
|
||||||
let png2 = loadPNG32(temp)
|
let png2 = loadPNG32(temp)
|
@ -85,4 +85,4 @@ proc convert(dir: string) =
|
|||||||
let data2 = readFile(bmpName)
|
let data2 = readFile(bmpName)
|
||||||
assert data1 == data2
|
assert data1 == data2
|
||||||
|
|
||||||
convert("suite")
|
convert(".." & DirSep & "suite")
|
Loading…
x
Reference in New Issue
Block a user