Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

AsTare

macrumors newbie
Original poster
Oct 11, 2010
4
0
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 !!

Here are the screenshots (pictures are not deformed, it's the result i want to have):

on iphone 3GS : screenshot iphone 3GS

on iphone 4 : screenshot iphone 4

With deformed pictures :

on iphone 3GS : deformed iphone 3GS screenshot

on iphone 4 : deformed iphone 4 screenshot
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.