Rotated JPGs in electron's BrowserWindow


#1

hi, I’ve got a newbie electron question about jpegs which are rotated. I’m trying to render a gallery of photos taken on an iphone. Some have a rotated90 attribute set in the jpeg file. These pictures show up fine in Chrome (in Mac OS), and all my apps (Preview, Desktop, etc.) but show up rotated in electron.

Any ideas how to get electron to honor the rot90 attribute? Doesn’t electron’s BrowserWindow use Chrome?

I have no problem reading and verifying the EXIF value from the file. The problem is that the in electron’s BrowserWindow DOM is rendered incorrectly.

Here is an example image. The EXIF data shows Orientation==6 (rotated 90° CCW). In all my apps (desktop, Chrome, Safari, Firefox, Preview) the green tag is at the top of the picture, and the wooden bars are vertical - i.e. normal.

In my electron app, the green tag is on the left edge, and the wooden bars are horizontal - i.e. it’s displayed sideways.


#2

The image posted above is hosted on slack-files.com, which unfortunately removed the EXIF orientation property.

I have re-posted this topic as an issue in Github. Please view the sample image posted there. It has the correct EXIF orientation attribute.