Image EXIF/XMP metadata removal routine (#2863)

* [WIP] Added preferences for EXIF tags

* [WIP] Added arrays, keys, strings to support EXIF preferences

* [WIP] Updated SettingsFragment to setup summary of added preferences(locationAccuracy)

* [WIP] Added methods getStringSet()in BasicKvStore, KeyValueStore to support Set<String> data type used in preferences (EXIF tags)

* [WIP] Added methods for removing EXIF tags and anonimyzing location coordinates in FileProcessor, GPSExtractor

* [WIP] Fixed errors in preferences EXIF tags, added XMP removal routine

* [WIP] Removed erroneous location accuracy handling

* [WIP] Fixed mistyped GPS Tags

* Reverted BasicKvStore. Removed Set<String> support in BasicKvStore as JsonKVStore already has it.

* FileProcessor: Replaced throwing runtime exception with warning if EXIF redaction fails.

* FileMetadataUtils: Javadoc added

* [WIP] FileMetadataUtilsTest added

* [WIP] FileMetadataUtilsTest: added javadoc

* [WIP] FileMetadataUtilsTest: added javadoc

* [WIP] FileProcessor: fixed disposing observables

* [WIP] FileMetadataUtils.getTagsFromPref: changed return type from observable to simple array

* [WIP] FileProcessorTest: added test for redactExifTags

* [WIP] FileProcessorTest: redactExifTags() doesn't work properly
This commit is contained in:
Vitaly V. Pinchuk 2019-06-04 15:38:01 +03:00 committed by neslihanturan
parent 5690dd9d0b
commit cc0b059595
13 changed files with 291 additions and 2 deletions

View file

@ -14,4 +14,25 @@
<item>@string/license_pref_cc_by_sa_3_0</item>
<item>@string/license_pref_cc_by_sa_4_0</item>
</array>
<!--TODO add more EXIF tags-->
<array name="pref_exifTag_entries">
<item>@string/exif_tag_name_author</item>
<item>@string/exif_tag_name_copyright</item>
<item>@string/exif_tag_name_location</item>
<item>@string/exif_tag_name_cameraModel</item>
<item>@string/exif_tag_name_lensModel</item>
<item>@string/exif_tag_name_serialNumbers</item>
<item>@string/exif_tag_name_software</item>
</array>
<array name="pref_exifTag_values">
<item>@string/exif_tag_author</item>
<item>@string/exif_tag_copyright</item>
<item>@string/exif_tag_location</item>
<item>@string/exif_tag_cameraModel</item>
<item>@string/exif_tag_lensModel</item>
<item>@string/exif_tag_serialNumbers</item>
<item>@string/exif_tag_software</item>
</array>
</resources>

View file

@ -5,4 +5,13 @@
<string name="license_pref_cc_by_sa_3_0" translatable="false">CC BY-SA 3.0</string>
<string name="license_pref_cc_by_4_0" translatable="false">CC BY 4.0</string>
<string name="license_pref_cc_by_sa_4_0" translatable="false">CC BY-SA 4.0</string>
<string name="exif_tag_author" translatable="false">Author</string>
<string name="exif_tag_copyright" translatable="false">Copyright</string>
<string name="exif_tag_location" translatable="false">Location</string>
<string name="exif_tag_cameraModel" translatable="false">Camera Model</string>
<string name="exif_tag_lensModel" translatable="false">Lens Model</string>
<string name="exif_tag_serialNumbers" translatable="false">Serial Numbers</string>
<string name="exif_tag_software" translatable="false">Software</string>
</resources>

View file

@ -5,6 +5,7 @@
<string name="preference_category_appearance">Appearance</string>
<string name="preference_category_general">General</string>
<string name="preference_category_feedback">Feedback</string>
<string name="preference_category_privacy">Privacy</string>
<string name="preference_category_location">Location</string>
<string name="app_name">Commons</string>
<string name="bullet">&#8226; </string>
@ -537,6 +538,18 @@ Upload your first media by tapping on the add button.</string>
<string name="welcome_dont_upload_content_description">Examples of images not to upload</string>
<string name="skip_image">SKIP THIS IMAGE</string>
<string name="download_failed_we_cannot_download_the_file_without_storage_permission">Download Failed!!. We cannot download the file without external storage permission.</string>
<string name="manage_exif_tags">Manage EXIF Tags</string>
<string name="manage_exif_tags_summary">Select which EXIF tags to keep in uploads</string>
<string name="exif_tag_name_author">Author</string>
<string name="exif_tag_name_copyright">Copyright</string>
<string name="exif_tag_name_location">Location</string>
<string name="exif_tag_name_cameraModel">Camera Model</string>
<string name="exif_tag_name_lensModel">Lens Model</string>
<string name="exif_tag_name_serialNumbers">Serial Numbers</string>
<string name="exif_tag_name_software">Software</string>
<string name="share_text">Upload photos to Wikimedia Commons on your phone Download the Commons app: %1$s</string>
<string name="share_via">Share app via...</string>
<string name="image_info">Image Info</string>