Workaround for gc:arc SIGSEGV
This commit is contained in:
parent
2979b86aee
commit
bdfd175e02
1 changed files with 2 additions and 1 deletions
|
@ -437,9 +437,10 @@ proc encodePng*(
|
||||||
raise newException(PixieError, "Invalid PNG number of channels")
|
raise newException(PixieError, "Invalid PNG number of channels")
|
||||||
|
|
||||||
let data = cast[ptr UncheckedArray[uint8]](data)
|
let data = cast[ptr UncheckedArray[uint8]](data)
|
||||||
|
const signature = [137.uint8, 80, 78, 71, 13, 10, 26, 10]
|
||||||
|
|
||||||
# Add the PNG file signature
|
# Add the PNG file signature
|
||||||
result.add([137.uint8, 80, 78, 71, 13, 10, 26, 10])
|
result.add(signature)
|
||||||
|
|
||||||
# Add IHDR
|
# Add IHDR
|
||||||
result.addUint32(13.uint32.swap())
|
result.addUint32(13.uint32.swap())
|
||||||
|
|
Loading…
Reference in a new issue