Incorrectly rotated .heic images

A beta tester reported an issue with incorrectly rotated .heic images (taken with an iPhone XS Max).

If you find any other mis-rotated .heic images, and they don’t have any private content, please send an example to support@photostructure.com so we can make sure the bugfix works on your files too.

Update: the next version of PhotoStructure will switch from in-process HEIC conversions (which requires a compilation) to using an external tool (much like how ffmpeg or VLC are utilized for transcoding jobs).

As long as heif-convert is in your PATH, HEIF images will be imported and viewed.

This method turns out handle these orientations correctly, be faster (!), and much easier to support from all of PhotoStructure’s various editions.

I’m afarid this issue persist in 1.0

All portrait HEIC files seem to be rotated 90 degrees right. It seems to be all portrait photos, all landscape photos are correct.

Viewing the file in imageglass or gimp shows the correct orientation.

I can provide example photos if you wish. I exported exif info via imageglass (uses exiftool)

ExifTool-----------------------------:
ExifTool Version Number : 12.09

File---------------------------------:
File Name : 20210107_084834515_iOS.heic
Directory : E:/PICTURES/DATE/2021/01
File Size : 2.7 MB
File Modification Date/Time : 2021:01:07 09:48:34+01:00
File Access Date/Time : 2021:01:12 12:16:06+01:00
File Creation Date/Time : 2021:01:07 09:56:06+01:00
File Permissions : rw-rw-rw-
File Type : HEIC
File Type Extension : heic
MIME Type : image/heic
Exif Byte Order : Big-endian (Motorola, MM)
Image Width : 4032
Image Height : 3024

QuickTime----------------------------:
Major Brand : High Efficiency Image Format HEVC still image (.HEIC)
Minor Version : 0.0.0
Compatible Brands : mif1, MiPr, miaf, MiHB, heic
Handler Type : Picture
Primary Item Reference : 49
Meta Image Size : 4032x3024
HEVC Configuration Version : 1
General Profile Space : Conforming
General Tier Flag : Main Tier
General Profile IDC : Main Still Picture
Gen Profile Compatibility Flags : Main Still Picture, Main 10, Main
Constraint Indicator Flags : 176 0 0 0 0 0
General Level IDC : 90 (level 3.0)
Min Spatial Segmentation IDC : 0
Parallelism Type : 0
Chroma Format : 4:2:0
Bit Depth Luma : 8
Bit Depth Chroma : 8
Average Frame Rate : 0
Constant Frame Rate : Unknown
Num Temporal Layers : 1
Temporal ID Nested : No
Image Spatial Extent : 4032x3024
Rotation : 270
Image Pixel Depth : 8 8 8
Media Data Size : 2820924
Media Data Offset : 3432

EXIF---------------------------------:
Make : Apple
Camera Model Name : iPhone 11
Orientation : Rotate 90 CW
X Resolution : 72
Y Resolution : 72
Resolution Unit : inches
Software : 14.2
Modify Date : 2021:01:07 09:48:35
Host Computer : iPhone 11
Y Cb Cr Positioning : Centered
Exposure Time : 1/121
F Number : 1.8
Exposure Program : Program AE
ISO : 50
Exif Version : 0231
Date/Time Original : 2021:01:07 09:48:35
Create Date : 2021:01:07 09:48:35
Offset Time : +01:00
Offset Time Original : +01:00
Offset Time Digitized : +01:00
Components Configuration : Y, Cb, Cr, -
Shutter Speed Value : 1/121
Aperture Value : 1.8
Brightness Value : 5.237780467
Exposure Compensation : 0
Metering Mode : Multi-segment
Flash : Off, Did not fire
Focal Length : 4.3 mm
Subject Area : 2002 1505 2213 1324
Sub Sec Time Original : 181
Sub Sec Time Digitized : 181
Flashpix Version : 0100
Color Space : Uncalibrated
Exif Image Width : 4032
Exif Image Height : 3024
Sensing Method : One-chip color area
Scene Type : Directly photographed
Exposure Mode : Auto
White Balance : Auto
Focal Length In 35mm Format : 26 mm
Scene Capture Type : Standard
Lens Info : 1.539999962-4.25mm f/1.8-2.4
Lens Make : Apple
Lens Model : iPhone 11 back dual wide camera 4.25mm f/1.8
Composite Image : General Composite Image
GPS Latitude Ref : North
GPS Longitude Ref : East
GPS Altitude Ref : Above Sea Level
GPS Speed Ref : km/h
GPS Speed : 0.159621492
GPS Img Direction Ref : True North
GPS Img Direction : ########
GPS Dest Bearing Ref : True North
GPS Dest Bearing : #######
GPS Date Stamp : 2021:01:07
GPS Horizontal Positioning Error : 8.872468793 m

MakerNotes---------------------------:
Run Time Flags : Valid
Run Time Value : 1889156185867958
Run Time Scale : 1000000000
Run Time Epoch : 0
Acceleration Vector : -0.07901333276 -0.4597193001 -0.865364373

ICC_Profile--------------------------:
Profile CMM Type : Apple Computer Inc.
Profile Version : 4.0.0
Profile Class : Display Device Profile
Color Space Data : RGB
Profile Connection Space : XYZ
Profile Date Time : 2017:07:07 13:22:32
Profile File Signature : acsp
Primary Platform : Apple Computer Inc.
CMM Flags : Not Embedded, Independent
Device Manufacturer : Apple Computer Inc.
Device Model :
Device Attributes : Reflective, Glossy, Positive, Color
Rendering Intent : Perceptual
Connection Space Illuminant : 0.9642 1 0.82491
Profile Creator : Apple Computer Inc.
Profile ID : ca1a9582257f104d389913d5d1ea1582
Profile Description : Display P3
Profile Copyright : Copyright Apple Inc., 2017
Media White Point : 0.95045 1 1.08905
Red Matrix Column : 0.51512 0.2412 -0.00105
Green Matrix Column : 0.29198 0.69225 0.04189
Blue Matrix Column : 0.1571 0.06657 0.78407
Red Tone Reproduction Curve : (Binary data 32 bytes, use -b option to extract)
Chromatic Adaptation : 1.04788 0.02292 -0.0502 0.02959 0.99048 -0.01706 -0.00923 0.01508 0.75168
Blue Tone Reproduction Curve : (Binary data 32 bytes, use -b option to extract)
Green Tone Reproduction Curve : (Binary data 32 bytes, use -b option to extract)

Composite----------------------------:
Run Time Since Power Up : 21 days 20:45:56
Aperture : 1.8
Image Size : 4032x3024
Lens ID : iPhone 11 back dual wide camera 4.25mm f/1.8
Megapixels : 12.2
Scale Factor To 35 mm Equivalent : 6.1
Shutter Speed : 1/121
Create Date : 2021:01:07 09:48:35.181+01:00
Date/Time Original : 2021:01:07 09:48:35.181+01:00
Modify Date : 2021:01:07 09:48:35+01:00
GPS Altitude : 18.8 m Above Sea Level
GPS Latitude : ##########
GPS Longitude : #############
Circle Of Confusion : 0.005 mm
Field Of View : 69.4 deg
Focal Length : 4.3 mm (35 mm equivalent: 26.0 mm)
GPS Position : 59 deg 21’ 37.14" N, 17 deg 54’ 18.61" E
Hyperfocal Distance : 2.04 m
Light Value : 9.6

That’d be super, thanks!

I also see this in some of my heic photos, I’ll send a few examples

Yep… same here.

And if I use the “rotate” option, it rotates it, doesn’t handle the aspect ratio correctly, and then after a fairly short time period, it rotates it back.

I can provide example images if you want them.

Experiencing the same issue here with 1.0 beta 12 installed via Docker Compose.