simpler, faster
This commit is contained in:
parent
6d2c681a64
commit
6734f5eef9
|
@ -344,8 +344,7 @@ proc decodeImageData(
|
||||||
unfiltered.readUint8(bytePos + 1)
|
unfiltered.readUint8(bytePos + 1)
|
||||||
)
|
)
|
||||||
of 6:
|
of 6:
|
||||||
for i in 0 ..< header.height * header.width:
|
copyMem(result[0].addr, unfiltered[0].unsafeAddr, unfiltered.len)
|
||||||
result[i] = cast[ColorRGBA](unfiltered.readUint32(i * 4))
|
|
||||||
else:
|
else:
|
||||||
discard # Not possible, parseHeader validates
|
discard # Not possible, parseHeader validates
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue