开发者

iPhone App to generate thumbnail images for the image obtained via camera or photo gallery

My app allows user to obtain picture/image from camera/photo gallery and then the app will upload the images to remote storage. Since the thumbnail images of those images开发者_如何学C will be used in some scenarios, I need to generate the thumbnail images.

The questions are

  1. should the thumbnail images be generated by the app at the time when the original/raw image is obtained?

  2. is it achievable to upload a raw image and at least 2 of its thumbnail images at the same time from the app to the remote storage - let's say its Amazon S3 or Google App Engine

  3. is there any sample code out there that does the image transformation on iPhone?


  1. I think you should, and put a progress indicator on top to tell your user that "please wait, I'm generating thumbnails".
  2. I don't think at the same time is appropriate for you. Instead, you should try to upload them (2 thumbnails and 1 raw) in a serial manner. That is, "try 1st thumbnail, if succeed, try 2nd thumbnail...",since the internet connection for a mobile device like iPhone could be unstable. Requests-timing-out does happen, therefore it's better to always make sure you have finished the previous request before you start the next one.
  3. I think three20's TTThumbsViewController (or TTPhotoViewController) has done a good job in transforming original photos into square-shaped thumbnails. Maybe you should take a look at their source code.

btw, as for uploading photos to servers, I once used the ASIFormDataRequest to post my photos to a server. It worked pretty well.

Hope it helps. :-)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜