Save Image Example
Copy this code and paste it in your HTML
NSString *documentsPath
= [NSHomeDirectory
() stringByAppendingPathComponent
: @"Documents"];
NSString *filePath
= [documentsPath stringByAppendingPathComponent
: @"selectedImage.png"];
int i = 0;
while ( [[NSFileManager defaultManager
] fileExistsAtPath
: filePath
] ) {
filePath
= [NSString stringWithFormat
: @"%@/%@-%d.@%@", documentsPath,
@"selectedImage",
++i,
@"png"];
}
[NSImagePNGRepresentation(image) writeToFile: filePath atomically: YES]
URL: http://www.iphonedevsdk.com/forum/iphone-sdk-development/10006-uiimagepickercontroller-saving-cropped-image.html
Report this snippet
Comments
Subscribe to comments