I tying to check my image size after picking form the photo library by using this code.
NSData *imageData1 = [[NSData alloc] initWithData:UIImageJPEGRepresentation((imageview.image), 0.5)];
int imageSize = imageData1.length;
NSLog(@"SIZE OF IMAGE: %i ", imageSize);
SIZE OF IMAGE: 237125
imageSize has data length in bytes. You need to convert it to Mb
NSLog(@"SIZE OF IMAGE: %i Mb", imageSize/1024/1024);
You can also use following code
NSLog(@"SIZE OF IMAGE: %.2f Mb", (float)imageSize/1024/1024);
to receive output like
SIZE OF IMAGE: 0.23 Mb
for sizes less the 1 Mb.