AllanWang / Frost-for-Facebook

An extensive and functional third party app for Facebook
https://allanwang.github.io/Frost-for-Facebook/
GNU General Public License v3.0
1.09k stars 85 forks source link

Strip Metadata from Photos #1880

Open justinormont opened 2 years ago

justinormont commented 2 years ago

When uploading a picture, would it be possible to strip Exif metadata from the pictures?

For instance latitude, and longitude. Some camera also include the serial number of the camera/drone.

While there are other apps which can remove metadata, I suspect many people are using Frost for the extra privacy (and privacy should be a banner feature). Otherwise they would be using the official Facebook app. The multi-step process of using multiple apps to increase privacy is rather burdensome. Being default-on and staying with-in Frost is much more straight forward and simple.

Having this automated within the Frost will increase the privacy of your users.

ruralTom commented 2 years ago

You can turn off location data in your camera app if that helps. There's an app on fdroid called 'Scrambled exif' that you can use as a work around. Not saying this is a bad idea, just an option in the mean time.

You share a photo to Scrambled Exif, it does it's voodoo then reopens the share menu. Works for anything.

Feb 7, 2022 5:12:39 AM Justin Ormont @.***>:

When uploading a picture, would it be possible to strip Exif metadata[https://en.wikipedia.org/wiki/Exif] from the pictures?

For instance latitude, and longitude. Some camera also include the serial number of the camera/drone.

While there are other apps which can remove metadata, I suspect many people are using Frost for the extra privacy (and privacy should be a banner feature). Otherwise they would be using the official Facebook app. The multi-step process of using multiple apps to increase privacy is rather burdensome. Being default-on and staying with-in Frost is much more straight forward and simple.

Having this automated within the Frost will increase the privacy of your users.

— Reply to this email directly, view it on GitHub[https://github.com/AllanWang/Frost-for-Facebook/issues/1880], or unsubscribe[https://github.com/notifications/unsubscribe-auth/AG4SSAB6KAD63MWUEPTSF6DUZ7AMPANCNFSM5NXNE7XQ]. Triage notifications on the go with GitHub Mobile for iOS[https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675] or Android[https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub]. You are receiving this because you are subscribed to this thread. [data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADkAAAA5CAYAAACMGIOFAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAAkSURBVGiB7cExAQAAAMKg9U9tDQ+gAAAAAAAAAAAAAAAA4NQAMv0AAa3l6BAAAAAASUVORK5CYII=###24x24:true###][Tracking image][https://github.com/notifications/beacon/AG4SSAG5X52OFHSLVEMZHVLUZ7AMPA5CNFSM5NXNE7X2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4QY47CWA.gif]

justinormont commented 2 years ago

Yes, disabling location in the camera app, and external apps like 'Scrambled exif' are options.

Personally, I occasionally forget to use exif cleaner tools. As mentioned before, having this automated within the Frost will increase the privacy of your users.

I might recommend using Signal's method of simply recompressing the images: https://github.com/signalapp/Signal-Android/blob/a5e5a735800cbdb3afa01a67390b6efa2fc91be6/app/src/main/java/org/thoughtcrime/securesms/jobs/AttachmentCompressionJob.java#L297-L339

Note their comment: Compresses the images. Given that we compress every image, this has the fun side effect of stripping all EXIF data.

Both apps being under GPL-3.0 License increases the feasibility.

justinormont commented 2 years ago

Side note -- Frost may want to register the image/* (and perhaps video/*) intents (see: docs).

Currently Frost is not a sharing target, and doesn't show up in the sharing menu. Similar Open Source FB app, MaterialFBook, does show in the sharing menu, potentially allowing for easier implementation in Frost.

Adding the intents will allow users the happy-path of: (1) Take picture in their standard photos app, (2) share to Scrambled Exif [optional], (3) share to Frost, (4) Share pic on profile, or message.

AllanWang commented 2 years ago

What do the other web wrappers do when you share an image? Create a post? If it's a useful path, I'll consider adding it, but I'm not sure if Facebook exposes paths like that for their mobile site

justinormont commented 2 years ago

(Answered on forked issue https://github.com/AllanWang/Frost-for-Facebook/issues/1885#issuecomment-1042512629 ... to keep focus of this issue on stripping metadata from photos)

AllanWang commented 2 years ago

If the logic is small enough where I can write something small, I'll consider adding it. If it's going to be overly complex and spin off into a full independent project, I'd still encourage you to look at other metadata removing apps that can be integrated in your share flow for all apps.

What I'd imagine the use case would be is that you share a media asset to the other app, and they'd prompt another share intent that you can point towards any other app (including Frost). It is two steps, but it will work for all your other apps.

atom-smasher commented 1 year ago

I came here today to make this feature request, but it's already on the table.

Regarding intents, I don't understand Android development that well, but I'm wondering if it would be easier to just have an option that can "hook" into Scrambled Exif (if it's installed) or just copy the relevant code from any number of copy-left applications to do the same thing. Ideally, this would be "invisible" when a picture is uploaded via Frost; it would just happen automagically.

In my experience, it's a PITA to use Scrambled Exif with the current version of Frost, because I need to invoke several extra steps to save the new file. A slightly better workaround, for now, is Simple Gallery https://github.com/SimpleMobileTools/Simple-Gallery, which has a feature to remove exif data with less fiddling.