1
0
mirror of git://jb55.com/damus synced 2024-09-29 00:10:43 +00:00

privacy: always strip GPS data from images

Images selected from the photo library will automatically have their
gps data stripped regardless of whether the user toggles the 'Location'
button in the system level photo library view.

Changelog-Changed: Always strip GPS data from images
Closes: https://github.com/damus-io/damus/issues/1990
Lightning-address: kernelkind@getalby.com
Signed-off-by: kernelkind <kernelkind@gmail.com>
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
kernelkind 2024-02-19 15:53:56 -05:00 committed by William Casarin
parent 904ae6c24d
commit 4c0c8b6678

View File

@ -36,7 +36,8 @@ struct ImagePicker: UIViewControllerRepresentable {
guard let image = image as? UIImage, error == nil else { return }
let fixedImage = image.fixOrientation()
if let savedURL = self.saveImageToTemporaryFolder(image: fixedImage) {
if let savedURL = self.saveImageToTemporaryFolder(image: fixedImage),
removeGPSDataFromImage(fromImageURL: savedURL) {
self.parent.onMediaPicked(.image(savedURL))
self.parent.image_upload_confirm = true
}