ImageMagick 7.1+ on Fedora 36

I’m trying to convert AVIF files to other formats using morgify from ImageMagick. Using the ImageMagick package from the official repository, it would throw some errors and some people suggested trying the latest, non-legacy version of ImageMagick. How can I install it on Fedora Workstation 36?

I don’t use imagemagic, but ffmpeg installed from the rpmfusion repo should do it very nicely.

The real issue is that since ImageMagick is available from the fedora repo it has to NOT contain the restricted codecs (and ffmpeg-free from fedora is similarly limited). I have not tried using ImageMagic, but I do have ffmpeg and related installed from rpmfusion so most of the image and audio-video codecs are available.

What command do you use for that?
I’d get the following error message by running ffmpeg -i test.avif test.jpg:

ffmpeg version 5.0.1 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 12 (GCC)
  configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --docdir=/usr/share/doc/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' --extra-ldflags='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' --extra-cflags=' -I/usr/include/rav1e' --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3 --enable-bzlib --enable-chromaprint --disable-crystalhd --enable-fontconfig --enable-frei0r --enable-gcrypt --enable-gnutls --enable-ladspa --enable-libaom --enable-libdav1d --enable-libass --enable-libbluray --enable-libbs2b --enable-libcdio --enable-libdrm --enable-libjack --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libilbc --enable-libmp3lame --enable-libmysofa --enable-nvenc --enable-openal --enable-opencl --enable-opengl --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librav1e --enable-librubberband --enable-libsmbclient --enable-version3 --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-version3 --enable-vapoursynth --enable-libvpx --enable-vulkan --enable-libglslang --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libxml2 --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-avfilter --enable-libmodplug --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-lto --enable-libmfx --enable-runtime-cpudetect
  libavutil      57. 17.100 / 57. 17.100
  libavcodec     59. 18.100 / 59. 18.100
  libavformat    59. 16.100 / 59. 16.100
  libavdevice    59.  4.100 / 59.  4.100
  libavfilter     8. 24.100 /  8. 24.100
  libswscale      6.  4.100 /  6.  4.100
  libswresample   4.  3.100 /  4.  3.100
  libpostproc    56.  3.100 / 56.  3.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5603afd1d100] moov atom not found
test.avif: Invalid data found when processing input

Welcome @sepehr. Did you use morgify on the command-line or just misspell it in the post. See
mogrify(1). Could you provide the command-line.
Using WorkStation Fedora 37, I assumed that I was using the same version of IM (ImageMagick); but after failing to convert - the utility to change file format - avif to jpg, I ran

convert --version → Version: ImageMagick 6.9.12-64

See site for IM version 7.1 to adjust your command-line. To use Gimp, you must use version 2.99 and install this plugin gimp-avif-plugin. I’m on version 2.10 which fails even on heif files unless you

dnf install gimp-heif-plugin

A surprise was that all this was easily done on Image Viewer. I don’t know if this is the default since i executed

dnf install avif-pixbuf-loader libavif libavif-tools

beforehand trying to test Gimp.

I don’t have an avif file so cannot test it, but the first requirement would be to remove the ffmpeg-free from fedora and add the ffmpeg from rpmfusion, which also adds the codec dependencies.
Enable the rpmfusion repos as described here then sudo dnf swap ffmpeg-free ffmpeg --allowerasing
Once that is done then your command should work.

Another way might be to use gimp and open it as avif and export as jpg.

Thank you and sorry for the mistype of mogrify in my post.
I finally built the latest ImageMagick version (7.1.0-53) from source.

How do I know if I have ffmpeg-free? rpm -qa | grep ffmpeg doesn’t show it.

sudo dnf list installed ffmpeg\*

# dnf list installed ffmpeg\* shows this:

Installed Packages
ffmpeg.x86_64                  5.1.2-3.fc37              @rpmfusion-free        
ffmpeg-libs.x86_64             5.1.2-3.fc37              @rpmfusion-free        
ffmpegthumbs.x86_64            22.08.3-1.fc37            @rpmfusion-free-updates

And your command would give this error message: No match for argument: ffmpeg-free.

That would be expected if you had already performed the switch from ffmpeg-free to ffmpeg.