tags:

views:

596

answers:

2

Hi

I am using the image picker controller to get an image from the user. After some operations on the image, I want the user to be able to save the image at 1600x1200 px, 1024x1024 px or 640x480 px (something like iFlashReady app).

The last option is the size of image I get in the UIImagePickerControllerDelegate method (when using image from camera roll)

Is there any way we can save the image at these resolutions without pixelating the images?

I tried creating a bitmap context with the width and height I want (CGBitmapContextCreate) and drawing the image there. But the image gets pixelated at 1600x1200.

Thanks

+1  A: 

From faint memories of computer vision class from long ago, I think what you do is to blur the image after the up-convert.

swingfuture
+1  A: 

This is non-trivial. Your image just doesn't have enough data. To enlarge it you'll need to resample the image and interpolate between pixels (like photoshop when you resize an image).

Most likely you'll want to use a 3rd party library such as:

http://code.google.com/p/simple-iphone-image-processing/

This performs this and many other image processing functions.

Corey Floyd