hello ! I've converted UIImage to bytes array.
Now i need it back, I have no idea what should i do. Thanks )))
Code:
NSString* filePath = [[NSBundle mainBundle] pathForResource:@"point" ofType:@"jpg"];
NSData *data = [NSData dataWithContentsOfFile:filePath];
unsigned char *bytesArray = data.bytes;
NSUInteger lengthOfBytesArray = data.length;
NSMutableArray *array = [[NSMutableArray alloc] initWithCapacity:data.length];
if (data.length>0)
{
NSUInteger i = 0;
for (i = 0; i<data.length; i++) {
[array addObject:[NSNumber numberWithUnsignedChar:bytesArray[i]]];
}
}
Now i need it back, I have no idea what should i do. Thanks )))