strukturag / libheif

libheif is an HEIF and AVIF file format decoder and encoder.
Other
1.7k stars 298 forks source link

convert-im6.q16: no images defined #1315

Open adrhc opened 3 days ago

adrhc commented 3 days ago

is almost the same as displaying images still fails since version > 1.15.1 #974

strace -o temp/convert_trace.log convert /home/gigi/NextCloud/Documents/Accomodations/IMG_1626.HEIC /home/gigi/temp/IMG_1626.jpg
convert-im6.q16: no images defined `/home/gigi/temp/IMG_1626.jpg' @ error/convert.c/ConvertImageCommand/3229.

convert_trace.log

heif-convert works but convert doesn't in Ubuntu 23.10

gm convert -debug coder,exception /home/gigi/NextCloud/Documents/Accomodations/IMG_1626.HEIC info:-
19:57:31 0:0.001214  0.000u 1583625 constitute.c/ReadImage/1676/Coder:
  Invoking "HEIC" decoder (HEIF Image Format) subimage=0 subrange=0
19:57:31 0:0.003685  0.000u 1583625 heif.c/ReadHEIFImage/571/Coder:
  Geometry: 3024x4032
19:57:31 0:0.003699  0.000u 1583625 heif.c/ReadHEIFImage/573/Coder:
  Matte: False
19:57:31 0:0.003710  0.000u 1583625 heif.c/ReadMetadata/191/Coder:
  Profile "Exif" with content type "" and size 2778 bytes
19:57:31 0:0.003724  0.000u 1583625 heif.c/ReadColorProfile/328/Coder:
  Found color profile of type "prof")
19:57:31 0:0.003730  0.000u 1583625 heif.c/ReadColorProfile/342/Coder:
  Reading ICC profile with size 536 bytes
19:57:31 0:0.004190  0.000u 1583625 heif.c/ReadHEIFImage/650/Coder:
  heif_decode_image() reports error "Unsupported feature: Unsupported codec"
19:57:31 0:0.004440  0.000u 1583625 heif.c/ReadHEIFImage/653/CorruptImage:
  An error has occurred reading from file (/home/gigi/NextCloud/Documents/Accomodations/IMG_1626.HEIC)
19:57:31 0:0.004461  0.000u 1583625 constitute.c/ReadImage/1702/Coder:
  Returned from "HEIC" decoder, returned image is NULL!
gm convert: An error has occurred reading from file (/home/gigi/NextCloud/Documents/Accomodations/IMG_1626.HEIC).

gm convert -list formats |fgrep -i heif
     AVIF P  r--  HEIF Image Format (heif v16.2.0)
     HEIC P  r--  HEIF Image Format (heif v16.2.0)
     HEIF P  r--  HEIF Image Format (heif v16.2.0)

ldd /usr/bin/heif-convert
        linux-vdso.so.1 (0x00007fffc93e3000)
        libheif.so.1 => /lib/x86_64-linux-gnu/libheif.so.1 (0x00007cc02e957000)
        libjpeg.so.8 => /lib/x86_64-linux-gnu/libjpeg.so.8 (0x00007cc02e8d4000)
        libpng16.so.16 => /lib/x86_64-linux-gnu/libpng16.so.16 (0x00007cc02e89c000)
        libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007cc02e600000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007cc02e878000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007cc02e200000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007cc02e5e1000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007cc02e4f6000)
        /lib64/ld-linux-x86-64.so.2 (0x00007cc02ea21000)

$ldd $(which convert)
        linux-vdso.so.1 (0x00007ffc39e8b000)
        libMagickCore-6.Q16.so.6 => /lib/x86_64-linux-gnu/libMagickCore-6.Q16.so.6 (0x000077efb6000000)
        libMagickWand-6.Q16.so.6 => /lib/x86_64-linux-gnu/libMagickWand-6.Q16.so.6 (0x000077efb5ed7000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x000077efb5c00000)
        liblcms2.so.2 => /lib/x86_64-linux-gnu/liblcms2.so.2 (0x000077efb638c000)
        liblqr-1.so.0 => /lib/x86_64-linux-gnu/liblqr-1.so.0 (0x000077efb5800000)
        libfftw3.so.3 => /lib/x86_64-linux-gnu/libfftw3.so.3 (0x000077efb5400000)
        libxml2.so.2 => /lib/x86_64-linux-gnu/libxml2.so.2 (0x000077efb5a11000)
        libfontconfig.so.1 => /lib/x86_64-linux-gnu/libfontconfig.so.1 (0x000077efb633c000)
        libfreetype.so.6 => /lib/x86_64-linux-gnu/libfreetype.so.6 (0x000077efb5734000)
        libXext.so.6 => /lib/x86_64-linux-gnu/libXext.so.6 (0x000077efb6327000)
        libX11.so.6 => /lib/x86_64-linux-gnu/libX11.so.6 (0x000077efb52c2000)
        libbz2.so.1.0 => /lib/x86_64-linux-gnu/libbz2.so.1.0 (0x000077efb6312000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x000077efb62f3000)
        libltdl.so.7 => /lib/x86_64-linux-gnu/libltdl.so.7 (0x000077efb62e8000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x000077efb5649000)
        libgomp.so.1 => /lib/x86_64-linux-gnu/libgomp.so.1 (0x000077efb5e84000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x000077efb5e60000)
        /lib64/ld-linux-x86-64.so.2 (0x000077efb6419000)
        libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x000077efb517b000)
        libicuuc.so.72 => /lib/x86_64-linux-gnu/libicuuc.so.72 (0x000077efb4e00000)
        liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x000077efb5e2e000)
        libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x000077efb561e000)
        libpng16.so.16 => /lib/x86_64-linux-gnu/libpng16.so.16 (0x000077efb5143000)
        libbrotlidec.so.1 => /lib/x86_64-linux-gnu/libbrotlidec.so.1 (0x000077efb62d7000)
        libxcb.so.1 => /lib/x86_64-linux-gnu/libxcb.so.1 (0x000077efb5119000)
        libpcre2-8.so.0 => /lib/x86_64-linux-gnu/libpcre2-8.so.0 (0x000077efb507e000)
        libicudata.so.72 => /lib/x86_64-linux-gnu/libicudata.so.72 (0x000077efb3000000)
        libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x000077efb2c00000)
        libbrotlicommon.so.1 => /lib/x86_64-linux-gnu/libbrotlicommon.so.1 (0x000077efb505b000)
        libXau.so.6 => /lib/x86_64-linux-gnu/libXau.so.6 (0x000077efb62cf000)
        libXdmcp.so.6 => /lib/x86_64-linux-gnu/libXdmcp.so.6 (0x000077efb5e26000)
        libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x000077efb5e11000)
        libmd.so.0 => /lib/x86_64-linux-gnu/libmd.so.0 (0x000077efb504c000)
farindk commented 3 days ago

heif-convert works but convert doesn't in Ubuntu 23.10

Then ImageMagick might be the better place to report this.

If you have some images that also don't work with heif-convert from libheif v1.16.x, it might be because https://github.com/strukturag/libheif/issues/1190 and you should upgrade to a v1.18.x.

bobfriesenhahn commented 3 days ago

The 'ldd' you did is for the 'convert' from ImageMagick. For GraphicsMagick you might consider 'ldd gm' (or if a modules build, on the installed heif.so module).

bobfriesenhahn commented 3 days ago

Under Ubuntu 22.04 LTS I see that the latest GraphicsMagick release is able to read HEIC files via libheif and libde265.

bobfriesenhahn commented 3 days ago

It is unlikely that anyone is going to spend any time on Ubuntu 23.10 since it is not an LTS release, and 24.04 LTS is available for upgrade now.

farindk commented 3 days ago

heif_decode_image() reports error "Unsupported feature: Unsupported codec"

This indicates that the codec (libde265 plugin) was not installed or not used.

farindk commented 3 days ago

@adrhc You can attach an image that does not work for you, but I am confident that it is just a broken installation.