jangko / nimPNG

PNG (Portable Network Graphics) decoder and encoder written in Nim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow parsing into different data types

PMunch opened this issue · comments

Essentially it would be nice if nimPNG could parse a 16-bit greyscale into a seq[uint16] for example, and similarly write this data. This shouldn't be too hard to implement, although might add a bit of complexity when handling byte ordering, but it would make it much easier to use nimPNG.

This should be easy to implement. Only need to add seq[uint16] to openArray[byte] conversion for the input part. And a reverse process at the output end.