remicollet / remirepo

Issue tracker for

Home Page:https://rpms.remirepo.net/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vips unable to generate heif image

devhaozi opened this issue · comments

I install vips and vips-heif and vips-tools packages on AlmaLinux 9.3, and I try to use vips copy 1.png 1.heif to convert a png image to heif, it return error heifsave: Unsupported compression.

image

I've also tried other encodings such as avif jxl and they all work fine.

I was able to reproduce on EL-9 with libheif 1.16.1, but only once... so Heisenbug

libheif seems OK

$ heif-enc 1.png
$ file 1.heic
1.heic: ISO Media, HEIF Image HEVC Main or Main Still Picture Profile

$ heif-convert 1.heic  1.png
File contains 1 image
Written to 1.png
$ file 1.png
1.png: PNG image data, 420 x 460, 8-bit/color RGBA, non-interlaced

vips seems also OK

$ vips copy 1.png 1.heic
$ file 1.png 1.heic
1.png:  PNG image data, 420 x 460, 8-bit/color RGBA, non-interlaced
1.heic: ISO Media, HEIF Image HEVC Main or Main Still Picture Profile

$ vips copy 1.heic x.png
$ file 1.heic x.png
1.heic: ISO Media, HEIF Image HEVC Main or Main Still Picture Profile
x.png:  PNG image data, 420 x 460, 8-bit/color RGBA, non-interlaced

Ok, found:

# vips copy 1.png 1.heic
heifsave: Unsupported compression

# heif-enc --list-encoders
HEIC encoders:
AVIF encoders:
- aom = AOMedia Project AV1 Encoder v3.7.1 [default]

# dnf install libheif-freeworld
...

# heif-enc --list-encoders
HEIC encoders:
- x265 = x265 HEVC encoder (3.5+1-f0c1022b6) [default]
AVIF encoders:
- aom = AOMedia Project AV1 Encoder v3.7.1 [default]

# vips copy 1.png 1.heic
# file 1.heic
1.heic: ISO Media, HEIF Image HEVC Main or Main Still Picture Profile

This mean additional codecs (not suitable for EPEL) are available in RPMfusion

For next vips build, I will add a weak dependency on the libheif-freeworld, but this will only work if RPMFusion is enabled.

For next vips build, I will add a weak dependency on the libheif-freeworld, but this will only work if RPMFusion is enabled.

After enable RPMfusion and install libheif-freeworld, it works well. Thank you.