Hi,
i like to load a simple raw image file, the values in the raw-file are from 0 (black) to 255 (white)
NSData *d = [NSData dataWithContentsOfFile: string];
if(!d)
return NO;
int i=0;
const char *data = [d bytes];
while(i< (size*size))
{
NSLog(@"DATA: %d", data[i]);
i++;
}
i have a sample image with the values 255,0,127..., but i get the Output -1,0,92.
Anyone know whats wrong with my snippet??
When i save back the data, the Image looks ok.