ImageMagick won't thumbnail .cr3 photos. Libraw not working?

255 Views Asked by At

So I am having some trouble with ImageMagick. It won't work with raw images for. I was told I need to install Libraw. After reporting a bug on Github was told that Libraw wasn't installed

I have tried this commands to install Libraw and still nothing

sudo apt -y install libraw-bin

I get this output Reading package lists... Done Building dependency tree... Done Reading state information... Done libraw-bin is already the newest version (0.20.2-2ubuntu2). The following package was automatically installed and is no longer required: php8.1 Use 'sudo apt autoremove' to remove it. 0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded

This is the output for convert -version Version: ImageMagick 6.9.11-60 Q16 x86_64 2021-01-25 https://imagemagick.org Copyright: (C) 1999-2021 ImageMagick Studio LLC License: https://imagemagick.org/script/license.php Features: Cipher DPC Modules OpenMP(4.5) Delegates (built-in): bzlib djvu fftw fontconfig freetype heic jbig jng jp2 jpeg lcms lqr ltdl lzma openexr pangocairo png tiff webp wmf x xml zlib

I have also tried sudo apt -y install libraw20

output

Reading package lists... Done Building dependency tree... Done Reading state information... Done libraw20 is already the newest version (0.20.2-2ubuntu2). The following package was automatically installed and is no longer required: php8.1 Use 'sudo apt autoremove' to remove it. 0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.

This is the error I get when running the command convert /media/storage/admin/mike/sam-grad-2023/image.CR3 -thumbnail 200x200 image.png

convert-im6.q16: delegate failed 'ufraw-batch' --silent --create-id=also --out-type=png --out-depth=16 --output='%u.png' '%i'' @ error/delegate.c/InvokeDelegate/1966. convert-im6.q16: unable to open image /tmp/magick-Plw9lpdRh7_nHsISzt-dXhIHJAOm9olK.ppm': No such file or directory @ error/blob.c/OpenBlob/2924. convert-im6.q16: no images defined `image.png' @ error/convert.c/ConvertImageCommand/3229.

1

There are 1 best solutions below

0
On

It seems ufraw is unable to handle CR3 files and the solution is to use build ImageMaick with libraw instead.

I came up with the following to build ImageMagick including libraw on Ubuntu:

apt update
apt install -y build-essential git libraw-dev automake autoconf libtool gcc make cmake pkg-config vim
git clone https://github.com/ImageMagick/ImageMagick.git ImageMagick-7.1.1
cd ImageMagick-7.1.1
./configure --with-raw --prefix=/usr/local/bin --with-quantum-depth=16
make -j
make install
ldconfig