Small refactor
This commit is contained in:
parent
e8046da0ba
commit
c8d08e21a8
@ -50,10 +50,7 @@ internal class ImageExifTagRemover @Inject constructor(
|
|||||||
} ?: return@withContext jpegImageFile
|
} ?: return@withContext jpegImageFile
|
||||||
|
|
||||||
tryOrNull("Unable to remove ExifData") {
|
tryOrNull("Unable to remove ExifData") {
|
||||||
outputSet.removeField(ExifTagConstants.EXIF_TAG_GPSINFO)
|
tagsToRemove.forEach { tagInfo ->
|
||||||
outputSet.removeField(ExifTagConstants.EXIF_TAG_SUBJECT_LOCATION)
|
|
||||||
outputSet.removeField(ExifTagConstants.EXIF_TAG_USER_COMMENT)
|
|
||||||
GpsTagConstants.ALL_GPS_TAGS.forEach { tagInfo ->
|
|
||||||
outputSet.removeField(tagInfo)
|
outputSet.removeField(tagInfo)
|
||||||
}
|
}
|
||||||
} ?: return@withContext jpegImageFile
|
} ?: return@withContext jpegImageFile
|
||||||
@ -74,4 +71,12 @@ internal class ImageExifTagRemover @Inject constructor(
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private val tagsToRemove
|
||||||
|
get() = GpsTagConstants.ALL_GPS_TAGS +
|
||||||
|
listOf(
|
||||||
|
ExifTagConstants.EXIF_TAG_GPSINFO,
|
||||||
|
ExifTagConstants.EXIF_TAG_SUBJECT_LOCATION,
|
||||||
|
ExifTagConstants.EXIF_TAG_USER_COMMENT,
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user