Get back original size (height, width) from UIImage load with imageWithData
I just cant find useful information from web.
I have an UIImage which loaded from sqlLite with method imageWithData(NSData*), I just find the height and width of the size both be zero. I wanna get back t开发者_Python百科he original height and width of the image, is it possible? or I do need to store these information separately in sqllite?
Size property of UIImage will work fine.
UIImage *image=[UIImage imageWithData:@"slide"];
NSLog(@"WIDTH = %f and HEIGHT = %f\n",image.size.width,image.size.height);
What's wrong with using the UIImage
property size
?
精彩评论