I want to manipulate JPEG images with C++ using the decoder Mini Jpeg Decoder.
The problem is: I want to read pixel per pixel, but the decoder only returns an imageData-array, similar as libjpeg does.
I can't make a method like this:
char getPixel(char x, char y, unsigned char* imageData)
{
//...???
}
The return (the char
variable) should contain the luminance of the pixel.
(I work with grayscale images...)
How can I solve this problem?