I'm working on iOS devices with retina displays. Basically, I have a UIImageView
and set its image by loading a jpeg image in the documents folder.
Let's say, the UIImageView
has a size 100x100 points. And the jpeg image has dimensions of 200x200 pixels. As far as I understand, the jpeg image should be viewed in the UIImageView
without any scaling. I read the jpeg image as
NSString *docDir = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
NSString *jpegFilePath = [NSString stringWithFormat:@"%@/im_%d_%d.jpeg",docDir, dbPhotoId, i];
UIImage* tmpImage = [UIImage imageWithContentsOfFile:[NSString stringWithFormat:@"%@", jpegFilePath]];
the UIImage* tmpImage
has a scale factor of 1 and width and height of 200 and 200 (observed from tmpImage.scale
, tmpImage.size.width
and tmpImage.size.height
).
In this case, if I set the image property of the UIImageView
(with dimensions 100x100 points) as the tmpImage
, can I safely assume that there won't be any scaling or retina display problems ?