simpler, faster

This commit is contained in:
Ryan Oldenburg 2022-06-15 16:11:29 -05:00
parent 6d2c681a64
commit 6734f5eef9

View file

@ -344,8 +344,7 @@ proc decodeImageData(
unfiltered.readUint8(bytePos + 1)
)
of 6:
for i in 0 ..< header.height * header.width:
result[i] = cast[ColorRGBA](unfiltered.readUint32(i * 4))
copyMem(result[0].addr, unfiltered[0].unsafeAddr, unfiltered.len)
else:
discard # Not possible, parseHeader validates