Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/43.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
单击“使用照相机拍照”后,iphone会在应用程序中存储照片_Iphone_Image_Camera_Exif - Fatal编程技术网

单击“使用照相机拍照”后,iphone会在应用程序中存储照片

单击“使用照相机拍照”后,iphone会在应用程序中存储照片,iphone,image,camera,exif,Iphone,Image,Camera,Exif,我想通过应用程序单击使用相机的照片。然后将照片存储在应用程序中。可能吗?谁能告诉我这是如何实现的。我还想知道.EXIF数据是否会与图像一起保留。请帮助。此概念从应用程序中截取屏幕截图,稍后使用它们 一, 二, 三,。 稍后,如果要使用此图像 NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *uniquePath =

我想通过应用程序单击使用相机的照片。然后将照片存储在应用程序中。可能吗?谁能告诉我这是如何实现的。我还想知道.EXIF数据是否会与图像一起保留。请帮助。

此概念从应用程序中截取屏幕截图,稍后使用它们

一,

二,

三,。 稍后,如果要使用此图像

    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); 
    NSString *uniquePath = [[paths objectAtIndex:0] stringByAppendingPathComponent:[NSString stringWithFormat: @"%d.png",primaryKeyValue ]]; 
    UIImage *image = [UIImage imageWithContentsOfFile:uniquePath];  

谢谢你的回复。你能告诉我截图是什么吗?我不能完全理解它。我应该在哪里实现这个代码?我应该把它们放在-(void)imagePickerController:(UIImagePickerController*)picker完成了用info:(NSDictionary*)info点击media基本上我在视图上有一个按钮,点击那个按钮,我保存了屏幕上可见的任何东西的图像。屏幕截图基本上就是你在屏幕上看到的任何东西的图像。请接受答案,如果它对你有帮助,它在某种程度上对我有帮助。但是我想用相机拍一张照片,然后把照片保存起来。保存部分和后面的部分都很有用。请帮助我
    NSInteger primaryKeyValue = 1;
    NSArray* paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
    NSString* documentsDirectory = [paths objectAtIndex:0];
    NSString* fullPathToFile = [documentsDirectory stringByAppendingPathComponent:@"temp.png"];
    NSString *filePath2 = [documentsDirectory stringByAppendingPathComponent:[NSString stringWithFormat: @"%d.png",primaryKeyValue ]];
    NSFileManager *fileMgr = [NSFileManager defaultManager];
    [fileMgr moveItemAtPath:fullPathToFile toPath:filePath2 error:nil];
    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); 
    NSString *uniquePath = [[paths objectAtIndex:0] stringByAppendingPathComponent:[NSString stringWithFormat: @"%d.png",primaryKeyValue ]]; 
    UIImage *image = [UIImage imageWithContentsOfFile:uniquePath];