The following code translates a jpg into a string of chars.
CGImageRef imageRef = example.CGImage;
NSData *data = (NSData *) CGDataProviderCopyData(CGImageGetDataProvider(imageRef));
char *pixels = (char *)[data bytes];
a small piece of the output is:
"GJYˇKO[ˇFJSˇILQˇKNSˇKKSˇOOYˇMMYˇNNVˇOOWˇOOWˇNNVˇLLTˇKKSˇMMUˇOOWˇJMT"
I guess the 3 Symbols together consist of the infomation of one pixel, right?
And if this is true, how can i interpret this Symbols (colors e.g.)?
This will all depend on the color space of your image. If there is an alpha channel 4
chars will be one pixel and without it will be 3chars. If it isRGBAthen G is yourR, J is yourG, Y is yourBand ˇ is yourA. And if it isARGBit G is yourAetc.. Also when you convert your pixels to a char * remember to keep track of the length because any RGBA value of 0 will cause a null termination.