views:

56

answers:

1

Hello Guys,

I just integrated the photo viewer from three20 framework. Its working fine but some time images are overlapping, that ia happening only for thumnail image while original image is perfectly loaded. Till the original image loaded , at that point of time images are overlapping.

Did any one face this problem and have any solution for that?

Thanks

A: 

If images are overlapping, you are not correctly setting their size when you are including them in the photo view controller. You have to (unfortunately) tell three20 the exact size so it knows how to display them in paging mode of the scrollview.

Make sure you are resizing your thumbnails similar sizes to his (somewhere around 100 pixels tall or wide, based on if it's in portrait or landscape)

[[[MockPhoto alloc]
  initWithURL:@"http://farm4.static.flickr.com/3444/3223645618_13fe36887a_o.jpg"
  smallURL:@"http://farm4.static.flickr.com/3444/3223645618_f5e2fa7fea_t.jpg"
  size:CGSizeMake(320, 480) // see how he sets the size here for each and every photo? this is crucial
  caption:@"These are the wood tiles that we had installed after the accident."] autorelease],

If you look at the thumbnail, it is 67pixels by 100pixels: http://farm4.static.flickr.com/3444/3223645618_f5e2fa7fea_t.jpg

If you look at the regular photo, it is 320pixels by 480pixels. : http://farm4.static.flickr.com/3444/3223645618_13fe36887a_o.jpg

These are two independent files, the three20 code does not create the thumbnail for you based on the larger photo. You must do this manually or subclass whatever container class he uses to do it for you.

iWasRobbed
Yes i tried all the combination but won't work. Where i suppose check resizing code of thumbnail image ? May be i am missing some thing ?
sandy
Are you manually re-sizing thumnails or expecting the code to resize your image to a thumbnail? Joe created separate thumbnail files for each photo, he didn't subclass a UIImage for instance and resize it in there (in case you were expecting him to)
iWasRobbed
See updated post
iWasRobbed
images in my url are of 640x480 dimension. i tried my url images in TTCatalog, there also image are overlapping. Is image must be of 320x480 dimension . Is that mandatory ? Any idea ?If any customize code for that will be great help for me . Thanks for the response !!
sandy
Sorry Sandy, just now getting this comment. Did you ever figure this out? The pictures *do not* have to be 320x480 since three20 will scale them for you to fit. You may want to post an example project that will replicate the problem for one of us to look at. I originally had an overlap when I set the image to 480x320 instead of 320x480 in the code. But changing this around solved it for me. That's the **only** time I had an overlap though.
iWasRobbed