3

After upgrading to Ubuntu 22.04 I was pleasantly surprised that creating images with the new AVIF or HEIC formats was supported by default.

It's a breeze.

convert image.png image.avif
convert image.png image.heic

Unfortunately transparency is not working; converted to black in both formats.

So, is there any special setting needed to create transparent AVIF or HEIC images with convert?

Janghou
  • 6,035

2 Answers2

1

What version of ImageMagick are you running?

I was previously running 6.9 via the Ubuntu apt repository (i.e. apt install imagemagick) and had the same issue.

I uninstalled it and got the latest AppImage from here: https://imagemagick.org/script/download.php#linux and made it executable with chmod a+x magick and then moved it to the usr/bin folder so I can run magick anywhere.

The main difference is that your commands will look like magick convert ... instead of convert ... and also the AVIF issue is resolved :)

EDIT: it seems the actual MIME type resulting is an image/png rather than image/avif. Compiling ImageMagick with heic delegation manually seems like it should work.

I am not sure if it is intended behaviour for the AppImage, it seems like compiling manually may be the only way for now.

0

This is a known issue with ImageMagick 6.9.11 which is shipped with Ubuntu 22.04: https://bugs.launchpad.net/ubuntu/+source/imagemagick/+bug/1980124

Debian bug report: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1040307

Consider building ImageMagick from sources to get a newer version, or upgrade to the next Ubuntu LTS release when it comes out.