UIImage in a fine quality whatever the device
Hi !
I'm programming a RSS feed application, and i have a problem with pictures that i display for each article in a list. I'm using a custom UITableViewCell for each article, with an UIImageView place on it for the picture that i download on the net.
My problem is that on iphone 4, the picture is fine, but on an iphone 3GS, the quality is crap.
I've used two pieces of code. One, make the picture good in the two cases but the picture is deformed. Here i work on the UIImage element :
"
CGSize size = CGSizeMake(93, 64);
UIGraphicsBeginImageContext( size );
[img drawInRect:CGRectMake(0,0,size.width,size.height)];
img = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
"
The other one is just one line that cut the picture. That is what i want to do but the problem is that the quality is fine on the iphone 4 and not fine on the iphone 3GS. Here i work on the UIImageView element :
"
imgView.contentMode = UIViewContentModeScaleAspectFill;
"
I absolutely want to not deforme the picture. Is someone have a solution to my problem ?
Thanks in advance for helping me !!
|