开发者

PNG++ Read Pixel Color Values

How do I read the pixel color values in a png with png++? I dont see any way of reading values in the documentat开发者_开发百科ion. I need to get all the values rgba seperately and append them to a char array.


can't add a comment, so here goes :)

Actually, you should want image[Y][X] since first [] gets you to Y-th row, and then to the X-th column in that row.

Btw, I'm the author of PNG++. Feel free to ask more specific questions on the mailing list or at my private email, or here, if you like. :)


I've never used png++, but from reading the documentation on pixel I think you can access a pixel (X,Y) of png::image<T> image with image[Y][X] and then access the red, green and blue values by accessing image[Y][X].red, etc.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜