iphone retrieve image using URL using ALAsset

rakendu picture rakendu · Feb 15, 2011 · Viewed 10.6k times · Source

I want to know how to how to retrieve a image using URL. I am using the ALAsset. I followed the answer (the one with the tick mark) from the following link display image from URL retrieved from ALAsset in iPhone. How to retrieve the image and upload it?

Answer

Mike picture Mike · Apr 1, 2011

Have you managed to get the ALAsset? Once you do, getting the image is easy. To get a thumbnail, the asset has a method...thumbnail.

UIImage *img = [UIImage imageWithCGImage:[myAsset thumbnail]];

To get the full Res image you have to go through the default representation.

UIImage *img = [UIImage imageWithCGImage:[[myAsset defaultRepresentation] fullResolutionImage]

Hope this helps