Been battling this one for a while. Basically, I am converting an image into NSData so I can send it to a server. The code I have used before, but for some reason I am getting an ARC error on this. The error lands on the line I declare the imageData variable.
NOTE: myImage is handed to the method.
- (void)uploadImage:(NSImage *)myImage {
NSData *imageData = UIImageJPEGRepresentation(myImage, 1.0);
// Do something...
}
I get an error and two warnings
Error: Implicit conversion of 'int' to 'NSData *' is disallowed with ARC
Warning: Implicit declaration of function 'UIImageJPEGRepresentation' is invalid in C99
Warning: Incompatible integer to pointer conversion intializing 'NSData * __strong' with an expression of type 'int'
Any ideas?