//I do this in the didFinishPickingImage:(UIImage *)img method
NSData* imageData = UIImageJPEGRepresentation(img, 1.0);
//save to the default 100Apple(Camera Roll) folder.
[imageData writeToFile:@"/private/var/mobile/Media/DCIM/100APPLE/customImageFilename.jpg" atomically:NO];
The photos there are all named in IMG_####.JPG format.
There's also a .MISC folder which contains the thumbnail for each image.
To inspect the folder:
NSArray *directoryContent = [[NSFileManager defaultManager] directoryContentsAtPath:@"/private/var/mobile/Media/DCIM/100APPLE/.MISC"];
for(NSString * dir in directoryContent){
NSLog(dir);
}
No comments:
Post a Comment