Tobias Wood wrote:
> Michael,
> Thanks for the comments, much appreciated. I've attached an updated
> patch including your suggestions and some more whitespace for
> readability. There was no reason other than simplicity for not
> returning a 8-bit numpy array. I actually meant to ask about the
Michael,
Thanks for the comments, much appreciated. I've attached an updated patch
including your suggestions and some more whitespace for readability. There
was no reason other than simplicity for not returning a 8-bit numpy array.
I actually meant to ask about the ternary blocks - I think
I don't ever work with data-in-PNGs, so I won't comment on the use cases
or API here -- I'll leave that to others.
However, for the patch, I think the reinterpret_cast
would be safer as reinterpret_cast, since unsigned ints are
not guaranteed to be 16-bits, and png.h provides a nice convenient