views:

87

answers:

1

I have used the Three20 Framework to setup an image gallery in my iPhone App. I am sending in the specific width and height for each image, but when I view the individual images, they load at a slightly oversized size, they are a bit pixelated, and then they focus down to the correct size/ratio.

Most of the images are 300 x 400 and I am sending in 300 x 400 and the width and height, so when I view in landscape mode, I would expect the images to appear smaller than the overall screen, or to size-up to fill the screen.

Any ideas why I am getting larger images that size-down after they are fully loaded?

A: 

if you are in landscape and passing 300x400, then it loads the image at 300x400 then does the scale to landscape (which is 480x300 max possible) after it has loaded completely (and therefore the controller knows its size from the image itself).

Jesse Naugher
Now looking at it all again, I may have the height and width switched in the code... the image is 400 width x 300 height, so that should fit on the landscape iPhone without resizing. Will look into it this evening.
Chris
I have the width and height set correctly, but it is still resizing. An image with 400width x 300 height should fit in a landscape iPhone without being sized-down.
Chris
other thing i can think of retains to Three20 itself, the photo viewer uses the - (NSString*)URLForVersion:(TTPhotoVersion)version method to determine what image to load..it loads a small URL version first if specified then downloads the larger one in the background. this might have something to do with your problem?
Jesse Naugher
That could be what's going on. I am definitely sending in a large and small url and I think the small file is square, while the large file is rectangular. I will test and report back.
Chris
That appears to be the problem. I changed the actual size/shape of the thumbnail image and everything is now working properly.
Chris