plupload, preserve_headers = false, and autorotation issue

173 Views Asked by At

I have a jpeg image where the EXIF Orientation flag = 6, or "Rotate 90 CW". Here's the pertinent data from exiftool:

---- ExifTool ----
ExifTool Version Number         : 12.44
---- File ----
File Name                       : orig.jpg
Image Width                     : 4032
Image Height                    : 3024
---- EXIF ----
Orientation                     : Rotate 90 CW
Exif Image Width                : 4032
Exif Image Height               : 3024
---- Composite ----
Image Size                      : 4032x3024

Here's how IrfanView presents the image, with auto-rotate turned off:

the image top is to the left, indicating a 90 CW rotation is needed

Using the plupload "Getting Started" script from here, with preserve_headers = false, I get an image without EXIF headers - as expected - but rotated 180 degrees, which is unexpected. Again, the view with IrfanView:

the top of the image is now to the right - a 180 degree rotation

Here's the "resize" snippet from the code:

resize: {
            width: 5000,
            height: 5000,
            preserve_headers: false
        }

Is there something I'm doing wrong? I would have expected a 90 CW rotation on upload with the EXIF stripped.

Dan

Edit: I'm using plupload V2.3.9

BUMP

I'm getting the exact same result with plupload using these exif samples on github. I chose landscape_6, because it's Orientation is the same as my example ("Rotate 90 CW", or Orientation tag value 6). Here's the before and after upload views using IrfanView with no autorotate, preserve_headers = false:

before plupload

after plupload

Aren't these canonical examples for demonstrating exif properties? Unless I'm missing some fundamental point, plupload is busted. I'd much rather it be the former, and someone can tell me the error of my ways.

0

There are 0 best solutions below