copy for newImage
This commit is contained in:
parent
7c6528983c
commit
abf67489f1
|
@ -105,6 +105,9 @@ proc decodeGif*(data: string): Gif {.raises: [PixieError].} =
|
|||
|
||||
pos += 9
|
||||
|
||||
if pos + localColorTableSize * 3 > data.len:
|
||||
failInvalid()
|
||||
|
||||
var localColorTable: seq[ColorRGBX]
|
||||
if hasLocalColorTable:
|
||||
localColorTable.setLen(localColorTableSize)
|
||||
|
@ -384,7 +387,7 @@ proc decodeGifDimensions*(
|
|||
result.height = data.readInt16(8).int
|
||||
|
||||
proc newImage*(gif: Gif): Image {.raises: [].} =
|
||||
gif.frames[0]
|
||||
gif.frames[0].copy()
|
||||
|
||||
when defined(release):
|
||||
{.pop.}
|
||||
|
|
Loading…
Reference in a new issue