Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 11-22-2010, 03:59 AM   #1 (permalink)
Registered Member
 
Join Date: Oct 2010
Posts: 4
AsTare is on a distinguished road
Default 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 !!
AsTare is offline   Reply With Quote
Old 11-23-2010, 04:02 AM   #2 (permalink)
Registered Member
 
Join Date: Oct 2010
Posts: 4
AsTare is on a distinguished road
Default Screenshots

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 by AsTare; 11-23-2010 at 05:11 AM.
AsTare is offline   Reply With Quote
Reply

Bookmarks

Tags
picture, quality, scale, uiimage, uiimageview

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 372
7 members and 365 guests
apatsufas, Kirkout, lzwasyc, MarkC, Sami Gh, SamorodovAlex, VinceYuan
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,664
Threads: 94,120
Posts: 402,898
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Leslie80
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:45 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0