I'm experiencing some weird problem.
I've created a file, 2400 bytes long. Each bit in those bytes represents a (white/black) pixel.
I load the file like this:
Code:
NSData *data = [NSData dataWithContentsOfFile:path];
Byte *byteData = (Byte*)malloc([data length]);
memcpy(byteData, [data bytes], i);
but for some reason, the bytes are scrambled... I can't really identify the pattern of that disruption.
I've created the file in windows using C# and wrote it into a file using File.WriteAllBytes(). I analyzed it using C# too, and it was OK there.
Any ideas why it isn't OK in Objective C/Mac? Is there a difference in the way Mac and Windows read bytes?

or maybe NSData inserts some of its own bytes into the file's bytes?
thanks