downSize image from iPhone while uploading
<p>I have an application,
in which </p>

<p>User selects an images from iPhone, for photo field,</p>

<p>Image is uploaded to the server,</p>

<p>Image size may be of 1 kb, or 10 kb or it may be 1 mb or 10 mb.</p>

<p><b>If image size is more than 5mb than image must be downsized upto 5mb before storing to the server.Question is How?is it Possible?</b><br></p>

<p>i have used following code for downloading image - for compressing image while loading,<br>
imageDatafromPhoto = UIImageJPEGRepresentation([info objectForKey:@"UIImagePickerControllerOriginalImage"],0.2);</p>

<p>Thanks for helping me.</p>
