Open LvChenhui opened 1 year ago
GraphicsMagic (and many other users) only include AVIF support by default, HEIC is encumbered by an obnoxious number of patents by very litigious companies. You have to build it yourself to get that support, via de265 and x265.
It might be worth saying that HEVC/H.265 support has been excluded, since it's such a common case for open source repositories.
Can I ask why this is reported against libheif, rather than against GraphicsMagick? Did they suggest it was an upstream issue?
GraphicsMagic (and many other users) only include AVIF support by default, HEIC is encumbered by an obnoxious number of patents by very litigious companies. You have to build it yourself to get that support, via de265 and x265.
It might be worth saying that HEVC/H.265 support has been excluded, since it's such a common case for open source repositories.
I've already installed de265 and x265
#yum info x265
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
* nux-dextop: li.nux.ro
* rpmfusion-free-updates: mirrors.ustc.edu.cn
Available Packages
Name : x265
Arch : x86_64
Version : 2.9
Release : 3.el7
Size : 39 k
Repo : rpmfusion-free-updates/x86_64
Summary : H.265/HEVC encoder
URL : http://x265.org/
License : GPLv2+ and BSD
Description : The primary objective of x265 is to become the best H.265/HEVC encoder
: available anywhere, offering the highest compression efficiency and the highest
: performance on a wide variety of hardware platforms.
:
: This package contains the command line encoder.
#yum -y info libde265
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
* nux-dextop: li.nux.ro
* rpmfusion-free-updates: mirrors.ustc.edu.cn
Installed Packages
Name : libde265
Arch : x86_64
Version : 1.0.2
Release : 6.el7
Size : 801 k
Repo : installed
From repo : rpmfusion-free-updates
Summary : Open H.265 video codec implementation
URL : http://www.libde265.org/
License : LGPLv3+
Description : libde265 is an open source implementation of the H.265 video codec.
: It is written from scratch for simplicity and efficiency. Its simple
: API makes it easy to integrate it into other software.
$heif-enc --list-encoders
HEIC encoders:
- x265 = x265 HEVC encoder (2.9) [default]
AVIF encoders:
$heif-convert --list-decoders
HEIC decoders:
- libde265 = libde265 HEVC decoder, version 1.0.2
AVIF decoders:
uncompressed: yes
The error is reported in
heif.c/ReadHEIFImage/557/Coder:
heif_decode_image() reports error "Unsupported feature: Unsupported codec"
Looks like he failed to decode it.But libde265 show installed correctly, I don't know where is the problem
Thank you for your reply
Can I ask why this is reported against libheif, rather than against GraphicsMagick? Did they suggest it was an upstream issue?
I'm not entirely sure whether it's GraphicsMagick's problem or libheif's problem, but the error message points to the decode part of libheif.
18:34:14 0:0.003435 0.000u 38929 heif.c/ReadHEIFImage/557/Coder:
heif_decode_image() reports error "Unsupported feature: Unsupported codec"
Thank you for your reply
GraphicsMagic (and many other users) only include AVIF support by default, HEIC is encumbered by an obnoxious number of patents by very litigious companies. You have to build it yourself to get that support, via de265 and x265. It might be worth saying that HEVC/H.265 support has been excluded, since it's such a common case for open source repositories.
I've already installed de265 and x265
#yum info x265 Loaded plugins: fastestmirror, ovl Loading mirror speeds from cached hostfile * nux-dextop: li.nux.ro * rpmfusion-free-updates: mirrors.ustc.edu.cn Available Packages Name : x265 Arch : x86_64 Version : 2.9 Release : 3.el7 Size : 39 k Repo : rpmfusion-free-updates/x86_64 Summary : H.265/HEVC encoder URL : http://x265.org/ License : GPLv2+ and BSD Description : The primary objective of x265 is to become the best H.265/HEVC encoder : available anywhere, offering the highest compression efficiency and the highest : performance on a wide variety of hardware platforms. : : This package contains the command line encoder.
#yum -y info libde265 Loaded plugins: fastestmirror, ovl Loading mirror speeds from cached hostfile * nux-dextop: li.nux.ro * rpmfusion-free-updates: mirrors.ustc.edu.cn Installed Packages Name : libde265 Arch : x86_64 Version : 1.0.2 Release : 6.el7 Size : 801 k Repo : installed From repo : rpmfusion-free-updates Summary : Open H.265 video codec implementation URL : http://www.libde265.org/ License : LGPLv3+ Description : libde265 is an open source implementation of the H.265 video codec. : It is written from scratch for simplicity and efficiency. Its simple : API makes it easy to integrate it into other software.
$heif-enc --list-encoders HEIC encoders: - x265 = x265 HEVC encoder (2.9) [default] AVIF encoders:
$heif-convert --list-decoders HEIC decoders: - libde265 = libde265 HEVC decoder, version 1.0.2 AVIF decoders: uncompressed: yes
The error is reported in
heif.c/ReadHEIFImage/557/Coder: heif_decode_image() reports error "Unsupported feature: Unsupported codec"
Looks like he failed to decode it.But libde265 show installed correctly, I don't know where is the problem
Does heif-convert decode the file OK?
Can you share the problem file?
GraphicsMagic (and many other users) only include AVIF support by default, HEIC is encumbered by an obnoxious number of patents by very litigious companies. You have to build it yourself to get that support, via de265 and x265. It might be worth saying that HEVC/H.265 support has been excluded, since it's such a common case for open source repositories.
I've already installed de265 and x265
#yum info x265 Loaded plugins: fastestmirror, ovl Loading mirror speeds from cached hostfile * nux-dextop: li.nux.ro * rpmfusion-free-updates: mirrors.ustc.edu.cn Available Packages Name : x265 Arch : x86_64 Version : 2.9 Release : 3.el7 Size : 39 k Repo : rpmfusion-free-updates/x86_64 Summary : H.265/HEVC encoder URL : http://x265.org/ License : GPLv2+ and BSD Description : The primary objective of x265 is to become the best H.265/HEVC encoder : available anywhere, offering the highest compression efficiency and the highest : performance on a wide variety of hardware platforms. : : This package contains the command line encoder.
#yum -y info libde265 Loaded plugins: fastestmirror, ovl Loading mirror speeds from cached hostfile * nux-dextop: li.nux.ro * rpmfusion-free-updates: mirrors.ustc.edu.cn Installed Packages Name : libde265 Arch : x86_64 Version : 1.0.2 Release : 6.el7 Size : 801 k Repo : installed From repo : rpmfusion-free-updates Summary : Open H.265 video codec implementation URL : http://www.libde265.org/ License : LGPLv3+ Description : libde265 is an open source implementation of the H.265 video codec. : It is written from scratch for simplicity and efficiency. Its simple : API makes it easy to integrate it into other software.
$heif-enc --list-encoders HEIC encoders: - x265 = x265 HEVC encoder (2.9) [default] AVIF encoders:
$heif-convert --list-decoders HEIC decoders: - libde265 = libde265 HEVC decoder, version 1.0.2 AVIF decoders: uncompressed: yes
The error is reported in
heif.c/ReadHEIFImage/557/Coder: heif_decode_image() reports error "Unsupported feature: Unsupported codec"
Looks like he failed to decode it.But libde265 show installed correctly, I don't know where is the problem
Does heif-convert decode the file OK?
Can you share the problem file?
it executed successfully, And I think this may not be an issue with the image itself. Thanks.
$heif-convert heic.jpg heic.png
File contains 1 image
Written to heic.png
So if heif-convert worked, and you still have problems with GM, you must have more than one libheif installed, or GM is doing something a bit strange .
I found a command with an error, which also looks like a decoding issue.
$heif-info avif.jpg
MIME type: image/avif
main brand: avif
compatible brands: avif, mif1, miaf
image: 1000x1000 (id=1), primary
color profile: nclx
alpha channel: no
depth channel: no
metadata:
none
transformations:
none
region annotations:
none
properties:
Could not decode image Unsupported feature: Unsupported codec
That appears to be a different problem since it is about avif not heif. You might want to create a distinct issue and attach the file. Or since your earlier reports did not show an AVIF decoder (just de265), maybe you should fix your configuration first.
oh...It was my mistake, and I was able to handle the HEIF image successfully.
heif-info heic.jpg
MIME type: image/heic
main brand: heic
compatible brands: mif1, heic
image: 2000x2586 (id=25), primary
color profile: no
alpha channel: no
depth channel: no
metadata:
none
transformations:
none
region annotations:
none
properties:
I'm sure only one libheif was installed.
In the version of gm
that does not support libheif
, running the command gm identify img.heif
will lead to an error. However, in our current version, it can return results as expected, as previously mentioned. But when running -verbose
to get more information, errors may occur.
Thank you for your continuous help~
$gm -version
...
HEIF/HVEC ("HEIC") yes
...
I still don't think that this is a libheif problem, since the libheif tools work as expected.
I am confused by the discussion of various versions of GM, which you probably need to work though (e.g., with ldd
) to figure out what is happening.
@LvChenhui were you able to resolve your issue? If not, can you add more details that would allow your issue to be reproduced?
HI, I installed GraphicsMagick that supports libheif
It seems that the installation is successful, but some commands do not support it. Is this normal?
Thanks