This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 10 - Pages: 1 - Last Post: 30 May 22, 14:45 Last Post By: davidekholm
akmeikle

Posts: 9
Registered: 15-Dec-2008
fatal error with HEIC images
Posted: 21 May 22, 20:45
 
  Click to reply to this thread Reply
Attachment IMG_0518.HEIC (2.8 MB)
Error message gets thrown when I generate an album with these images.

No issues opening the files in windows but jAlbum just doesn't lime them

aught java.lang.IndexOutOfBoundsException: Index -1 out of bounds for length 6 reading file info C:\Users\Alistair\Desktop\New folder\test\IMG_0518.HEIC using net.jalbum.jdeli.JDeliImageReader@12731405
Encountering java.lang.RuntimeException: Error processing C:\Users\Alistair\Desktop\New folder\test when evaluating: jdk.nashorn.api.scripting.NashornScriptEngine$3@68a76fc
java.lang.RuntimeException: Error processing C:\Users\Alistair\Desktop\New folder\test
at se.datadosen.jalbum.AlbumBean.registerVariables(AlbumBean.java:2820)
at se.datadosen.jalbum.AlbumObjectImpl.getVars(AlbumObjectImpl.java:2800)
at jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$Recompilation$22$39050$init.initAlbum(C:\Users\Alistair\AppData\Roaming\JAlbum\skins\Tiger\init.js:1646)
at jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$10$init.:program(C:\Users\Alistair\AppData\Roaming\JAlbum\skins\Tiger\init.js:1876)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(Unknown Source)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptFunction.invoke(Unknown Source)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptRuntime.apply(Unknown Source)
at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(Unknown Source)
at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine$3.eval(Unknown Source)
at java.scripting/javax.script.CompiledScript.eval(Unknown Source)
at se.datadosen.jalbum.AlbumBean.processExpression(AlbumBean.java:3019)
at se.datadosen.jalbum.AlbumBean.processScript(AlbumBean.java:2941)
at se.datadosen.jalbum.AlbumBean.prepareMakeAlbum(AlbumBean.java:3497)
at se.datadosen.jalbum.AlbumBean.makeAlbum(AlbumBean.java:3205)
at se.datadosen.jalbum.AlbumBean.smartMakeAlbum(AlbumBean.java:3154)
at se.datadosen.jalbum.JAlbumFrame$7.run(JAlbumFrame.java:1170)
Caused by: java.lang.RuntimeException: Unexpected error processing C:\Users\Alistair\Desktop\New folder\test\IMG_0518.HEIC
at se.datadosen.util.FileFilters.getBasicImageInfo(FileFilters.java:571)
at se.datadosen.jalbum.AlbumObjectImpl.getImageInfo(AlbumObjectImpl.java:314)
at se.datadosen.jalbum.AlbumObjectImpl.getSize(AlbumObjectImpl.java:322)
at se.datadosen.jalbum.AlbumBean.addFilteredImageSizes(AlbumBean.java:3920)
at se.datadosen.jalbum.AlbumBean.registerVariables(AlbumBean.java:2804)
... 15 more
Caused by: java.lang.IndexOutOfBoundsException: Index -1 out of bounds for length 6
at java.base/jdk.internal.util.Preconditions.outOfBounds(Unknown Source)
at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Unknown Source)
at java.base/jdk.internal.util.Preconditions.checkIndex(Unknown Source)
at java.base/java.util.Objects.checkIndex(Unknown Source)
at java.base/java.util.ArrayList.get(Unknown Source)
at com.marx.jt.HeicMetaReader.parseImageMeta(HeicMetaReader.java:89)
at com.marx.jt.HeicMetaReader.decodeInputStream(HeicMetaReader.java:53)
at net.jalbum.jdeli.JDeliImageReader.readImageDimension(JDeliImageReader.java:224)
at net.jalbum.jdeli.JDeliImageReader.getWidth(JDeliImageReader.java:79)
at se.datadosen.util.FileFilters.getBasicImageInfo(FileFilters.java:553)
... 19 more
JeffTucker

Posts: 8,459
Registered: 31-Jan-2006
Re: fatal error with HEIC images
Posted: 21 May 22, 21:16   in response to: akmeikle in response to: akmeikle
 
  Click to reply to this thread Reply
Attachment IMG_0518b.jpg (3.3 MB)
Not sure why the HEIC reader in jAlbum is choking on that. David will probably pass the image along to the folks who provide the reader.

It's not the usual problem, which is that a file with an HEIC extension is actually just a JPG with the wrong extension on it - this image really is an HEIC image. That happens when images are stored on Google Photos. When you retrieve them, they get converted to JPG, but they retain the HEIC file extension, so all hell breaks loose.

No problem if I convert it to a JPG using IrfanView or Photoshop Elements - one such conversion, attached.

HEIC is a curse.

https://shkspr.mobi/blog/2020/12/coping-with-heic-in-the-browser/
RobM

Posts: 4,380
Registered: 4-Aug-2006
Re: fatal error with HEIC images
Posted: 21 May 22, 21:58   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
I just ran the image through exiftool and it gave a 'Warning: Truncated "jxf0xb4S" data'.

I then opened the image in Preview and exported it as IMG_0518_PreviewExport.heic, attached. In exiftool the warning has gone and in jAlbum the image loads and builds fine.

Attached is the 'new' file.

For reference the exiftool data for the original and the exported version:
ExifTool Version Number : 11.54
File Name : IMG_0518.HEIC
Directory : /Users/robert/My Albums/Test
File Size : 2.8 MB
File Modification Date/Time : 2022:05:21 20:20:34+01:00
File Access Date/Time : 2022:05:21 20:24:29+01:00
File Inode Change Date/Time : 2022:05:21 20:22:21+01:00
File Permissions : rw-r--r--
File Type : HEIC
File Type Extension : heic
MIME Type : image/heic
Major Brand : High Efficiency Image Format HEVC still image (.HEIC)
Minor Version : 0.0.0
Compatible Brands : mif1, heic, miaf, MiHB
Handler Type : Picture
Primary Item Reference : 49
Image Pixel Depth : 8 8 8
Image Width : 4032
Image Height : 3024
Image Spatial Extent : 4032x3024
Movie Data Size : 2823038
Movie Data Offset : 2762
Warning : Truncated 'jxf0xb4S' data
Image Size : 4032x3024
Megapixels : 12.2

IMG_0518_PreviewExport.heic
ExifTool Version Number : 11.54
File Name : IMG_0518_PreviewExport.heic
Directory : /Users/robert/My Albums/Test
File Size : 2.7 MB
File Modification Date/Time : 2022:05:21 20:36:52+01:00
File Access Date/Time : 2022:05:21 20:38:47+01:00
File Inode Change Date/Time : 2022:05:21 20:36:54+01:00
File Permissions : rw-r--r--
File Type : HEIC
File Type Extension : heic
MIME Type : image/heic
Major Brand : High Efficiency Image Format HEVC still image (.HEIC)
Minor Version : 0.0.0
Compatible Brands : heic, mif1
Handler Type : Picture
Primary Item Reference : 49
Exif Byte Order : Big-endian (Motorola, MM)
Make : Apple
Camera Model Name : iPhone 13 Pro
Orientation : Horizontal (normal)
X Resolution : 72
Y Resolution : 72
Resolution Unit : inches
Software : 15.4.1
Host Computer : iPhone 13 Pro
Tile Width : 512
Tile Length : 512
Exposure Time : 1/73
F Number : 1.5
Exposure Program : Program AE
ISO : 125
Exif Version : 0232
Date/Time Original : 2022:04:17 15:07:59
Offset Time : -04:00
Offset Time Original : -04:00
Offset Time Digitized : -04:00
Shutter Speed Value : 1/73
Aperture Value : 1.5
Brightness Value : 2.605559574
Exposure Compensation : 0
Metering Mode : Multi-segment
Flash : Off, Did not fire
Focal Length : 5.7 mm
Subject Area : 2015 1506 2323 1327
Run Time Flags : Valid
Run Time Value : 49523460864625
Run Time Scale : 1000000000
Run Time Epoch : 0
Acceleration Vector : -0.5675466657 -0.06428350507 -0.8173402547
Content Identifier : 18AB6284-8E92-49CE-B2C4-5CF173F1F9F0
Sub Sec Time Original : 376
Sub Sec Time Digitized : 376
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
Lens Info : 1.570000052-9mm f/1.5-2.8
Lens Make : Apple
Lens Model : iPhone 13 Pro back triple camera 5.7mm f/1.5
GPS Latitude Ref : North
GPS Longitude Ref : West
GPS Altitude Ref : Above Sea Level
GPS Speed Ref : km/h
GPS Speed : 0.09476011557
GPS Img Direction Ref : Magnetic North
GPS Img Direction : 269.2059327
GPS Dest Bearing Ref : Magnetic North
GPS Dest Bearing : 269.2059327
GPS Horizontal Positioning Error: 5.04823602 m
XMP Toolkit : XMP Core 6.0.0
Create Date : 2022:04:17 15:07:59.376
Creator Tool : 15.4.1
Modify Date : 2022:04:17 15:07:59
Composite Image : 2
Date Created : 2022:04:17 15:07:59.376
Image Width : 4032
Image Height : 3024
Image Spatial Extent : 4032x3024
Rotation : 0
Image Pixel Depth : 8 8 8
Movie Data Size : 2780620
Movie Data Offset : 2770
Aperture : 1.5
GPS Altitude : 80.7 m Above Sea Level
GPS Latitude : removed by me
GPS Longitude : removed by me
GPS Position : removed by me
Image Size : 4032x3024
Megapixels : 12.2
Run Time Since Power Up : 13:45:23
Scale Factor To 35 mm Equivalent: 4.6
Shutter Speed : 1/73
Create Date : 2022:04:17 15:07:59.376-04:00
Date/Time Original : 2022:04:17 15:07:59.376-04:00
Modify Date : 2022:04:17 15:07:59-04:00
Circle Of Confusion : 0.007 mm
Field Of View : 69.4 deg
Focal Length : 5.7 mm (35 mm equivalent: 26.0 mm)
Hyperfocal Distance : 3.29 m
Light Value : 7.0
RobM

Posts: 4,380
Registered: 4-Aug-2006
Re: fatal error with HEIC images
Posted: 21 May 22, 22:20   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
It was enough to open the original image in Preview, then use File>Duplicate to get a version that works in jAlbum.
davidekholm

Posts: 4,405
Registered: 18-Oct-2002
Re: fatal error with HEIC images
Posted: 23 May 22, 10:55   in response to: akmeikle in response to: akmeikle
 
  Click to reply to this thread Reply
What tool was used to generate the original failing heic image?
akmeikle

Posts: 9
Registered: 15-Dec-2008
Re: fatal error with HEIC images
Posted: 23 May 22, 13:15   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
My iPhone 13 pro
davidekholm

Posts: 4,405
Registered: 18-Oct-2002
Re: fatal error with HEIC images
Posted: 23 May 22, 16:52   in response to: akmeikle in response to: akmeikle
 
  Click to reply to this thread Reply
Thanks. I'm using iPhone 12 mini and can export HEIC images fine. I tried AirDrop. Can you try AirDrop too?
akmeikle

Posts: 9
Registered: 15-Dec-2008
Re: fatal error with HEIC images
Posted: 23 May 22, 18:34   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
Have hundreds of images that work fine so it’s weird that a handful have problems

Under “settings -> photos” I have it set to “keep originals” under “transfer to max or PC

Have more samples of heic images that crash Jalbum if you want me to upload those too
davidekholm

Posts: 4,405
Registered: 18-Oct-2002
Re: fatal error with HEIC images
Posted: 26 May 22, 14:16   in response to: akmeikle in response to: akmeikle
 
  Click to reply to this thread Reply
akmeikle wrote:
Have hundreds of images that work fine so it’s weird that a handful have problems

Under “settings -> photos” I have it set to “keep originals” under “transfer to max or PC

Have more samples of heic images that crash Jalbum if you want me to upload those too


I think the sample image you have is enough. Try moving it to your Mac using AirDrop and see if there's any difference. If not, I'll have to involve the 3:rd party company that have developed the HEIC decoder.
akmeikle

Posts: 9
Registered: 15-Dec-2008
Re: fatal error with HEIC images
Posted: 27 May 22, 14:02   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
I'm a PC guy :)

I usually had my phone convert to jpg when importing photos but since you guys added HEIF support i've been using the native format (saves lots of space)
davidekholm

Posts: 4,405
Registered: 18-Oct-2002
Re: fatal error with HEIC images
Posted: 30 May 22, 14:45   in response to: akmeikle in response to: akmeikle
 
  Click to reply to this thread Reply
I've reported this to the makers of our HEIC image reader (the JDeli team at IDRSolutions.com)
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums