Hello, I have come across the imaging dependency of aspose which looks pretty good. Now i tried using it with the HEIC Adapter that is a openize wrapper. Sadly I did not manage to load the file.
I ran ffmpeg to check if the file is ok, this is the result:
ffmpeg -i IMG_3333.HEIC
ffmpeg version 7.1.1 Copyright (c) 2000-2025 the FFmpeg developers
built with Apple clang version 17.0.0 (clang-1700.0.13.3)
configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/7.1.1_3 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags='-Wl,-ld_classic' --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libharfbuzz --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox --enable-neon
libavutil 59. 39.100 / 59. 39.100
libavcodec 61. 19.101 / 61. 19.101
libavformat 61. 7.100 / 61. 7.100
libavdevice 61. 3.100 / 61. 3.100
libavfilter 10. 4.100 / 10. 4.100
libswscale 8. 3.100 / 8. 3.100
libswresample 5. 3.100 / 5. 3.100
libpostproc 58. 3.100 / 58. 3.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x79d008000] Ignoring duplicate CLLI/COLL
Last message repeated 29 times
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'IMG_3333.HEIC':
Metadata:
major_brand : heic
minor_version : 0
compatible_brands: heicmif1
Duration: N/A, start: 0.000000, bitrate: N/A
Stream group #0:0[0x1f]: Tile Grid: hevc (Main Still Picture) (hvc1 / 0x31637668), yuvj420p(pc, smpte170m/unknown/unknown), 2180x2783 (default)
Stream group #0:1[0x29]: Tile Grid: hevc (Rext) (hvc1 / 0x31637668), gray(pc), 1090x1392
These are the dependencies I included according to the github README:
<dependency>
<groupId>com.aspose</groupId>
<artifactId>aspose-imaging</artifactId>
<version>25.4</version>
</dependency>
<dependency>
<groupId>com.aspose</groupId>
<artifactId>openize-heic</artifactId>
<version>25.4</version>
</dependency>
<dependency>
<groupId>com.aspose</groupId>
<artifactId>aspose-imaging-heic-adapter</artifactId>
<version>25.4</version>
</dependency>
What I am trying to do is:
try (Image asposeImage = Image.load(inputStream)) {
ByteArrayOutputStream os = new ByteArrayOutputStream();
asposeImage.save(os, new PngOptions());
try (ByteArrayInputStream bis = new ByteArrayInputStream(os.toByteArray())) {
bufferedImage = ImageIO.read(bis);
}
}
There is also an error from openize:
Caused by: java.lang.IllegalArgumentException: 1668050025
at openize.isobmff.BoxType.codeToType(BoxType.java:380) ~[openize-heic-25.4.jar:25.4]
Thank you for your help in advance ![]()