In my application i have image with dimension 1936*2592 and size upto 6 MB. i need scale image to 0.25 or resize image to 478*640 and then upload it to server. I have tried lots of ways to do it in ios6 but failed
imageData= UIImagePNGRepresentation(self.cl_PriviewImage);
UIImage *temp = [[UIImage alloc] initWithData: imageData];
ScaledImage = [temp resizedImage:CGSizeMake(478, 640) interpolationQuality:kCGInterpolationHigh];
ScaledData = UIImagePNGRepresentation( ScaledImage);
//self.cl_PriviewImage is my image it shows resizedImage method not found. I have also tried with ScaleToSize method but its showing same error.
i have also tried with
ScaledImage = [UIImage imageWithCGImage:self.cl_PriviewImage.CGImage scale:0.25f orientation:self.cl_PriviewImage.imageOrientation];
ScaledData = UIImagePNGRepresentation(ScaledImage);
in this case there is no error but my purpose didn't get fulfilled i.e uploaded image doesn't get changed in scale/size.
Is there any any other way in iOS 6 or am i wrong some where? Please suggest me. Thanks in advance