New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inverted width and height for HEIC portrait image (taken in upright position) #130
Comments
@stefanoverna any ideas here? Looks to me like we would be open for a PR to fix this. @azharbeebeejaun can you confirm we compensate for rotation on jpgs? |
@SamSaffron yes indeed, jpgs work great. Here are the output for pictures taken on the same phone but in .jpg format (changed the format setting to most compatible from high efficiency).
exiftool output for XR-jpg-p.jpgExifTool Version Number : 11.88 File Name : XR-jpg-p.jpg Directory : . File Size : 2013 kB File Modification Date/Time : 2021:07:19 09:12:37+04:00 File Access Date/Time : 2021:07:19 09:13:03+04:00 File Inode Change Date/Time : 2021:07:19 09:12:49+04:00 File Permissions : rw-rw-r-- File Type : JPEG File Type Extension : jpg MIME Type : image/jpeg Exif Byte Order : Big-endian (Motorola, MM) Make : Apple Camera Model Name : iPhone XR Orientation : Rotate 90 CW X Resolution : 72 Y Resolution : 72 Resolution Unit : inches Software : 14.4.2 Modify Date : 2021:07:19 09:08:05 Host Computer : iPhone XR Y Cb Cr Positioning : Centered Exposure Time : 1/871 F Number : 1.8 Exposure Program : Program AE ISO : 25 Exif Version : 0232 Date/Time Original : 2021:07:19 09:08:05 Create Date : 2021:07:19 09:08:05 Offset Time : +04:00 Offset Time Original : +04:00 Offset Time Digitized : +04:00 Components Configuration : Y, Cb, Cr, - Shutter Speed Value : 1/871 Aperture Value : 1.8 Brightness Value : 8.452682127 Exposure Compensation : 0 Metering Mode : Multi-segment Flash : Off, Did not fire Focal Length : 4.2 mm Subject Area : 2013 1511 2217 1330 Run Time Flags : Valid Run Time Value : 36778734825458 Run Time Scale : 1000000000 Run Time Epoch : 0 Acceleration Vector : -0.002466715639 -0.8906965256 -0.454434067 Sub Sec Time Original : 510 Sub Sec Time Digitized : 510 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 : 4.25mm f/1.8 Lens Make : Apple Lens Model : iPhone XR back camera 4.25mm f/1.8 Composite Image : General Composite Image GPS Latitude Ref : South GPS Longitude Ref : East GPS Altitude Ref : Above Sea Level GPS Speed Ref : km/h GPS Speed : 0 GPS Img Direction Ref : True North GPS Img Direction : 17.17580414 GPS Dest Bearing Ref : True North GPS Dest Bearing : 17.17580414 GPS Date Stamp : 2021:07:19 GPS Horizontal Positioning Error: 20.85939082 m Compression : JPEG (old-style) Thumbnail Offset : 2442 Thumbnail Length : 7155 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) Image Width : 4032 Image Height : 3024 Encoding Process : Baseline DCT, Huffman coding Bits Per Sample : 8 Color Components : 3 Y Cb Cr Sub Sampling : YCbCr4:2:0 (2 2) Run Time Since Power Up : 10:12:59 Aperture : 1.8 Image Size : 4032x3024 Megapixels : 12.2 Scale Factor To 35 mm Equivalent: 6.1 Shutter Speed : 1/871 Create Date : 2021:07:19 09:08:05.510+04:00 Date/Time Original : 2021:07:19 09:08:05.510+04:00 Modify Date : 2021:07:19 09:08:05+04:00 Thumbnail Image : (Binary data 7155 bytes, use -b option to extract) GPS Altitude : 39.3 m Above Sea Level GPS Latitude : 20 deg 6' 27.83" S GPS Longitude : 57 deg 41' 42.04" E Circle Of Confusion : 0.005 mm Field Of View : 69.4 deg Focal Length : 4.2 mm (35 mm equivalent: 26.0 mm) GPS Position : 20 deg 6' 27.83" S, 57 deg 41' 42.04" E Hyperfocal Distance : 2.04 m Light Value : 13.5 exiftool output for XR-jpg-l.jpgExifTool Version Number : 11.88 File Name : XR-jpg-l.jpg Directory : . File Size : 1973 kB File Modification Date/Time : 2021:07:19 09:13:11+04:00 File Access Date/Time : 2021:07:19 09:13:49+04:00 File Inode Change Date/Time : 2021:07:19 09:13:11+04:00 File Permissions : rw-rw-r-- File Type : JPEG File Type Extension : jpg MIME Type : image/jpeg Exif Byte Order : Big-endian (Motorola, MM) Make : Apple Camera Model Name : iPhone XR Orientation : Rotate 180 X Resolution : 72 Y Resolution : 72 Resolution Unit : inches Software : 14.4.2 Modify Date : 2021:07:19 09:07:56 Host Computer : iPhone XR Y Cb Cr Positioning : Centered Exposure Time : 1/429 F Number : 1.8 Exposure Program : Program AE ISO : 25 Exif Version : 0232 Date/Time Original : 2021:07:19 09:07:56 Create Date : 2021:07:19 09:07:56 Offset Time : +04:00 Offset Time Original : +04:00 Offset Time Digitized : +04:00 Components Configuration : Y, Cb, Cr, - Shutter Speed Value : 1/429 Aperture Value : 1.8 Brightness Value : 7.694290935 Exposure Compensation : 0 Metering Mode : Multi-segment Flash : Off, Did not fire Focal Length : 4.2 mm Subject Area : 2013 1511 2217 1330 Run Time Flags : Valid Run Time Value : 36769393391125 Run Time Scale : 1000000000 Run Time Epoch : 0 Acceleration Vector : 0.9488855599 -0.0628478825 -0.2945564392 Sub Sec Time Original : 336 Sub Sec Time Digitized : 336 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 : 4.25mm f/1.8 Lens Make : Apple Lens Model : iPhone XR back camera 4.25mm f/1.8 Composite Image : General Composite Image GPS Latitude Ref : South GPS Longitude Ref : East GPS Altitude Ref : Above Sea Level GPS Speed Ref : km/h GPS Speed : 0.9206481575 GPS Img Direction Ref : True North GPS Img Direction : 342.0844037 GPS Dest Bearing Ref : True North GPS Dest Bearing : 342.0844037 GPS Date Stamp : 2021:07:19 GPS Horizontal Positioning Error: 24.15145428 m Compression : JPEG (old-style) Thumbnail Offset : 2442 Thumbnail Length : 5711 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) Image Width : 4032 Image Height : 3024 Encoding Process : Baseline DCT, Huffman coding Bits Per Sample : 8 Color Components : 3 Y Cb Cr Sub Sampling : YCbCr4:2:0 (2 2) Run Time Since Power Up : 10:12:49 Aperture : 1.8 Image Size : 4032x3024 Megapixels : 12.2 Scale Factor To 35 mm Equivalent: 6.1 Shutter Speed : 1/429 Create Date : 2021:07:19 09:07:56.336+04:00 Date/Time Original : 2021:07:19 09:07:56.336+04:00 Modify Date : 2021:07:19 09:07:56+04:00 Thumbnail Image : (Binary data 5711 bytes, use -b option to extract) GPS Altitude : 39.5 m Above Sea Level GPS Latitude : 20 deg 6' 27.58" S GPS Longitude : 57 deg 41' 41.61" E Circle Of Confusion : 0.005 mm Field Of View : 69.4 deg Focal Length : 4.2 mm (35 mm equivalent: 26.0 mm) GPS Position : 20 deg 6' 27.58" S, 57 deg 41' 41.61" E Hyperfocal Distance : 2.04 m Light Value : 12.4 |
I don't have much time at this moment, so PRs are super welcome :) I'll try to do my best in the next days! |
@stefanoverna I tried get the exifs location, but stopped when I had to parse the iloc box... I might get back to it later, but put it there meanwhile. |
@SamSaffron @ombr I should have fixed the issue in PR #131 |
Sounds great ! We will do some testing on our end. Do you know when this will be released ? |
I'm not a maintainer, sorry 😐 |
Thanks a lot @stefanoverna. @SamSaffron any ideas on when a new version with #131 is planned for patch release? Thank you. |
I will cut a new version tomorrow, please remind me in 2-3 more days if I
forget
…On Mon, 9 Aug 2021 at 6:21 pm, Azhar Beebeejaun ***@***.***> wrote:
Thanks a lot @stefanoverna <https://github.com/stefanoverna>.
@SamSaffron <https://github.com/SamSaffron> any ideas on when a new
version with #131 <#131> is
planned for patch release? Thank you.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#130 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAABIXP7RFNRNWGLSBFQ423T36FXDANCNFSM5APBFDIQ>
.
|
⏰ Friendly reminder for @SamSaffron ⏰ |
I pushed a release a few days ago :)
…On Mon, 16 Aug 2021 at 10:17 pm, Stefano Verna ***@***.***> wrote:
⏰ Friendly reminder for @SamSaffron <https://github.com/SamSaffron> ⏰
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#130 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAABIXJQUGWJH223VP2J3ETT5D6U3ANCNFSM5APBFDIQ>
.
|
Hello,
I was testing the HEIC support on 2.2.4 and noticed the width and height are inverted for images taken on an iPhone XR (heic format; iOS 14.4.2). The phone was upright, in portrait orientation and not rotated to any side, so the width of the image in its correct orientation should really be the lesser value (3024) but instead FastImage returns 4032. The image in question is named
Sanex-Portrait-Upright.heic
and is available at the URL in the logs below. A second image was taken with the same phone rotated to the right (90 degrees) and has been included for comparison and test; this one has the correct width and height.I know HEIC format support has been added recently, but is this a known bug yet? Grateful to know of any workaround/fixes, if available yet.
I have included the
exiftool
outputs for both images. The Rotation of 270 on Sanex-Portrait-Upright.heic caught my eye.Thank you.
exiftool output for Sanex-Portrait-Upright.heic
exiftool output for Jabra-Lenovo.heic
The text was updated successfully, but these errors were encountered: