Exif information get lost while preprocessing image on upload Android
I'm uploading image with preprocessing and image EXIF information gets lost, without preprocessing it is there, because of that I cannot rotate image to correct orientation.
This is my code
MediaManager.get()
.upload(absolutePath)
.preprocess(ImagePreprocessChain.limitDimensionsChain(CloudinaryConsts.PREFERED_PHOTO_SIZE, CloudinaryConsts.PREFERED_PHOTO_SIZE)
.addStep(DimensionsValidator(CloudinaryConsts.MIN_PHOTO_SIZE, CloudinaryConsts.MIN_PHOTO_SIZE, CloudinaryConsts.PREFERED_PHOTO_SIZE, CloudinaryConsts.PREFERED_PHOTO_SIZE))
.saveWith(BitmapEncoder(BitmapEncoder.Format.WEBP, CloudinaryConsts.IMAGE_QUALITY)))
.option("tags", "profile")
.option("folder", CloudinaryConsts.PROFILE_PHOTOS_FOLDER)
.option("public_id", profileUuid)
.dispatch(App.instance)
without preprocess step EXIF is there
Can I keep EXIF somehow or could I do rotation before upload
Examples:
with preprocessing: http://res.cloudinary.com/dyz7kja60/image/upload/v1531752452/profile_photos/4f548657-0ee4-483c-b892-72872864c2ed
without preprocessing: http://res.cloudinary.com/dyz7kja60/image/upload/a_ignore/v1531753661/profile_photos/4f548657-0ee4-483c-b892-72872864c2ed
-
Hi Roman,
If you add any transformation to the image, Cloudinary strips the image metadata in order to optimize the image. You can use the flag "keep_iptc" when doing the transformation and it will keep the EXIF information.
Here is more information about it: https://cloudinary.com/documentation/image_transformations#metadata_and_color_profiles_flags
0 -
Hi Aditi
Thank you for your reply.
In my case EXIF information gets lost while I'm uploading image not downloading, it happens on this step:preprocess(ImagePreprocessChain.limitDimensionsChain(CloudinaryConsts.PREFERED_PHOTO_SIZE, CloudinaryConsts.PREFERED_PHOTO_SIZE)
.addStep(DimensionsValidator(CloudinaryConsts.MIN_PHOTO_SIZE, CloudinaryConsts.MIN_PHOTO_SIZE, CloudinaryConsts.PREFERED_PHOTO_SIZE, CloudinaryConsts.PREFERED_PHOTO_SIZE))
.saveWith(BitmapEncoder(BitmapEncoder.Format.WEBP, CloudinaryConsts.IMAGE_QUALITY)))0 -
Thanks, Roman for the information. At the moment we don't support preprocessing while retaining the EXIF data. I will raise a feature request for this feature.
Regards,
Aditi0 -
Hi, is there any news about that feature request?
0 -
Hi Leonardo,
This feature has yet to be added to our roadmap. When we'll have more insight on this, we'll update with more information here on this thread.
0
Post is closed for comments.
Comments
5 comments