processImage .
, Apple PhotoPicker
, Apple , . , . :
/*
Start the timer to take a photo every 1.5 seconds.
CAUTION: for the purpose of this sample, we will continue to take pictures indefinitely.
Be aware we will run out of memory quickly. You must decide the proper threshold number of photos allowed to take from the camera.
One solution to avoid memory constraints is to save each taken photo to disk rather than keeping all of them in memory.
In low memory situations sometimes our "didReceiveMemoryWarning" method will be called in which case we can recover some memory and keep the app running.
*/
, Apple, .
imagePicker :
- (void)imagePickerController:(UIImagePickerController *)picker
didFinishPickingMediaWithInfo:(NSDictionary *)info
{
UIImage *image = [info valueForKey:UIImagePickerControllerOriginalImage];
[self.capturedImages removeAllObjects];
[self.imagePaths addObject:[self processImage:image]];
[self.capturedImages addObject:image];
if ([self.cameraTimer isValid])
{
return;
}
[self finishAndUpdate];
}
(1) - ,
(2) - , .
(3) - cameraTimer , finishAndUpdate .
processImage: , :
[self uploadImage:imageData withFilename:filename];
.
makeImageFileName:
static int imageName = 0;
-(NSString*)makeImageFilename {
imageName++;
return [NSString stringWithFormat:@"%d.jpg",imageName];
}
, Apple.
Apple (Timer (1) (2))

~ 140 ~ 40
(Timer (1) (2))

: ~ 30 .
iPhone5S. - 3264 x 2448 px, 24 (24- RGB). ( ) Jpeg 250 ( 0,1 ) 1-2 ( 0,7) ~ 6 ( 1,0).
, . : , . x x - - . jrturton, , , , , . , () imageView 832 x 640, , , , , . ~ 1,6 , 24 ( ).
processImage, -, , :
1/ . ?
2/ addImage uploadImage . , , .
3/ (- PhoneGap?)
, JPEG-:
NSData* imageData = UIImageJPEGRepresentation(image, 0.1);
, ImageIO, , , ImagePickerController. . : iPhone? AVFoundation, NSData, ,