On my server, I have three files per image.
- A thumbnail file, which is cropped to 128 by 128.
- A small file, which I aspect fit to a max of 160 by 240.
- A large file, which I aspect fit to a max of 960 by 540.
My method for returning these URLs to three20's gallery looks like this:
- (NSString*)URLForVersion:(TTPhotoVersion)version {
switch (version) {
case TTPhotoVersionLarge:
return _urlLarge;
case TTPhotoVersionMedium:
return _urlSmall;
case TTPhotoVersionSmall:
return _urlSmall;
case TTPhotoVersionThumbnail:
return _urlThumb;
default:
return nil;
}
}
After having logged when these various values are called, the following happens:
- When the thumbnail page loads, only thumbnails are called (as expected)
- When an image is tapped, the thumbnail appears, and not the small image.
- After that thumbnail appears, the large image is loaded directly (without the small image being displayed).
What I desire to happen is the following
- This is the same (thumbnails load as expected on the main page)
- When the image is tapped, the small image is loaded first
- Then after that, the large image is loaded.
Or, the following
- Thumbnails
- Straight to large image.
The problem with the thumb, is that I crop it so it is a square.
This means that when a thumbnail image is displayed in the main viewer (after thumb was tapped), it is oversized, and when the large image loads, it immediately scales down to fit.
That looks really bad, and to me, it would make far more sense if it loaded the thumbs in the thumbnail view, and then the small image followed by the large image in the detail view.
Does anyone have any suggestions on how to fix this?
Is the best way simply to make the thumbs the same aspect ratio?
I would appreciate any advice on this issue