136
Views
2
Comments
[Cropper Library] Issue with portrait photos / Exif Data / Javascript
cropper-mobile
Reactive icon
Forge asset by Labs

Hi all,

I'm having an issue with cropper pluggin and was hoping someone could help; I'm using Cropper to crop a portrait photo but in crop preview the photo becomes rotated.  This occurs with both camera and library photos and I'm using mobile iOS.

In reviewing, I believe it's an issue with the Exif Orientation. I tried to set 'checkOrientation' to false, this corrects the preview but the crop is rotated regardless.  Further, I tried a javascript element to fix the Exif data, but I'm unable to connect the dots fully. I left the javascript element as disabled if you'd like to check it out (within "onparameterschanged").

I've attached Test3 espace for review/reference.  Apologize for any relics, as this is a quick espace. Appreciate any guidance/assistance.

Thanks!

Brad

Test3.oml
2018-05-15 08-41-11
Davide Periquito

Hello Bradford,


I think I was facing the same or similar problems. I was able to achieve a "solution" with the following configurations. 

  1. Removed the onchangeAction from the cropper
  2. Removed this line on the code (Image below)
  3. Checkorientation is by default true no need to add (so no specific configuration required)

My only problem at this point is that the image is getting stretched when taken as a portrait. Not giving the correct height.

UserImage.jpg
Vikram M

Davide Periquito wrote:

Hello Bradford,


I think I was facing the same or similar problems. I was able to achieve a "solution" with the following configurations. 

  1. Removed the onchangeAction from the cropper
  2. Removed this line on the code (Image below)
  3. Checkorientation is by default true no need to add (so no specific configuration required)

My only problem at this point is that the image is getting stretched when taken as a portrait. Not giving the correct height.

 Hi Davide,For image stretch issue, you need resize the image before sending it to cropper. even i faced this issue in some of the devices, its device dependent. Use image resize from 'Image Utils Mobile' reduce the size this will fix the issue.


 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.