Raven Dreamer
Raven Dreamer

Reputation: 7140

How can I get pixel data from a .PNG?

Without using System.Drawing?

I have a C# application that receives a list of filepaths pointing to a number of .PNG files. I would like to extract an array of pixel (color) data from the image, but I am having trouble determining the best way to extract that.

I had originally hoped to be able to use System.Drawing, as outlined in this answer, but I am unable to access System.Drawing, since my application (Unity3d) uses OpenGL (and therefore, is incompatible with System.Drawing)

The PngBitmapDecoder is likewise out of reach of the application. Is there any other way I can extract the data I'm interested in, short of writing my own PNG Decoder?

Upvotes: 1

Views: 5734

Answers (1)

Related Questions