jjzjj

metadataAsMutable

全部标签

ios - 如何使用 lat long 在 Swift 中将 Exif 数据写入图像

我正在尝试将EXIF数据写入图像,但CGImageDestinationFinalize崩溃了:varimage=info[UIImagePickerControllerOriginalImage]as!UIImageletjpeg=UIImageJPEGRepresentation(image,1.0)varsource:CGImageSource?=nilsource=CGImageSourceCreateWithData((jpegasCFData?)!,nil)letmetadata=CGImageSourceCopyPropertiesAtIndex(source!,0,ni

ios - 如何使用 lat long 在 Swift 中将 Exif 数据写入图像

我正在尝试将EXIF数据写入图像,但CGImageDestinationFinalize崩溃了:varimage=info[UIImagePickerControllerOriginalImage]as!UIImageletjpeg=UIImageJPEGRepresentation(image,1.0)varsource:CGImageSource?=nilsource=CGImageSourceCreateWithData((jpegasCFData?)!,nil)letmetadata=CGImageSourceCopyPropertiesAtIndex(source!,0,ni