This commit is contained in:
andri lim 2018-03-17 21:32:04 +07:00
parent 7a98fec6cd
commit c55008c163
2 changed files with 4 additions and 4 deletions

View File

@ -29,7 +29,7 @@ import streams, endians, tables, hashes, math
import private.buffer, private.nimz import private.buffer, private.nimz
const const
NIM_PNG_VERSION = "0.2.0" NIM_PNG_VERSION = "0.2.1"
type type
PNGChunkType = distinct int32 PNGChunkType = distinct int32
@ -2021,7 +2021,7 @@ proc decodePNG*(s: Stream, settings = PNGDecoder(nil)): PNG =
result = png result = png
when not defined(js): when not defined(js):
proc loadPNG*(fileName: string, colorType: PNGColorType, bitDepth: int, settings: PNGDecoder): PNGResult = proc loadPNG*(fileName: string, colorType: PNGColorType, bitDepth: int, settings: PNGDecoder = nil): PNGResult =
try: try:
var s = newFileStream(fileName, fmRead) var s = newFileStream(fileName, fmRead)
if s == nil: return nil if s == nil: return nil

View File

@ -1,5 +1,5 @@
# Package # Package
version = "0.2.0" version = "0.2.1"
author = "Andri Lim" author = "Andri Lim"
description = "PNG encoder and decoder" description = "PNG encoder and decoder"
license = "MIT" license = "MIT"