CR2 (RAW) conversion not working

Dear Experts!

I'm having issues with handling CR2 (Canon RAW) images when running application in a cloud deployment. Once such a file is uploaded, there's no thumbnail created. I have initially thought that would be a missing converter, but it seems to be configured properly OOTB. Moreover, thumbnails are nicely created on my local Nuxeo Docker image.

Server log tells the following:

2020-05-21T14:25:12,855 ERROR [Nuxeo-Work-pictureViewsGeneration-1:default:cc762010-6408-43a5-b054-2c40b316ded3:file:content:pictureView] [org.nuxeo.ecm.platform.picture.ImagingComponent] Failed to get ImageInfo for file sample1.cr2
org.nuxeo.ecm.platform.commandline.executor.api.CommandException: Error code 1 return by command: identify -define registry:temporary-path=#{nuxeo.tmp.dir} -quiet -ping -format '%m %w %h %z %[colorspace]' #{inputFilePath}[0]
identify-im6.q16: FailedToExecuteCommand `'ufraw-batch' --silent --create-id=also --out-type=png --out-depth=16 '--output=/var/lib/nuxeo/server/tmp/magick-16966YY1LeJyZzWHm.png' '/var/lib/nuxeo/server/tmp/magick-16966KaFaQ0aNyGgE'' (-1) @ error/delegate.c/ExternalDelegateCommand/462.
  identify-im6.q16: delegate failed `'ufraw-batch' --silent --create-id=also --out-type=png --out-depth=16 '--output=%u.png' '%i'' @ error/delegate.c/InvokeDelegate/1919.
  CR2 8736 5856 16 sRGB
    at org.nuxeo.ecm.platform.commandline.executor.api.ExecResult.<init>(ExecResult.java:62) ~[nuxeo-platform-commandline-executor-10.10.jar:?]
    at org.nuxeo.ecm.platform.commandline.executor.service.executors.ShellExecutor.exec(ShellExecutor.java:82) ~[nuxeo-platform-commandline-executor-10.10.jar:?]
    at org.nuxeo.ecm.platform.commandline.executor.service.CommandLineExecutorComponent.execCommand(CommandLineExecutorComponent.java:173) ~[nuxeo-platform-commandline-executor-10.10.jar:?]
    at org.nuxeo.ecm.platform.picture.magick.utils.ImageIdentifier.getIdentifyResult(ImageIdentifier.java:60) ~[nuxeo-platform-imaging-core-10.10-HF21.jar:?]
    at org.nuxeo.ecm.platform.picture.magick.utils.ImageIdentifier.getInfo(ImageIdentifier.java:45) ~[nuxeo-platform-imaging-core-10.10-HF21.jar:?]
    at org.nuxeo.ecm.platform.picture.ImagingComponent.getImageInfo(ImagingComponent.java:182) [nuxeo-platform-imaging-core-10.10-HF21.jar:?]
    at org.nuxeo.ecm.platform.picture.api.adapters.AbstractPictureAdapter.getImageInfo(AbstractPictureAdapter.java:375) [nuxeo-platform-imaging-api-10.10.jar:?]
    at org.nuxeo.ecm.platform.picture.api.adapters.DefaultPictureAdapter.fillPictureViews(DefaultPictureAdapter.java:85) [nuxeo-platform-imaging-api-10.10.jar:?]
    at org.nuxeo.ecm.platform.picture.PictureViewsGenerationWork.work(PictureViewsGenerationWork.java:120) [nuxeo-platform-imaging-core-10.10-HF21.jar:?]
    at org.nuxeo.ecm.core.work.AbstractWork.runWorkWithTransaction(AbstractWork.java:493) [nuxeo-core-event-10.10-HF23.jar:?]
    at org.nuxeo.ecm.core.work.AbstractWork.run(AbstractWork.java:383) [nuxeo-core-event-10.10-HF23.jar:?]
    at org.nuxeo.ecm.core.work.WorkHolder.run(WorkHolder.java:57) [nuxeo-core-event-10.10-HF23.jar:?]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
    at java.lang.Thread.run(Thread.java:834) [?:?]

it may be that the ufraw-batch is missing, but I can't access the console there, otherwise troubleshooting would be easier. Before submitting an official ticket I was hoping somebody would have had similar issues and can suggest something.

I used a publically available CR2 sample from here: https://filesamples.com/samples/image/cr2/sample1.cr2

Thanks in advance!

Sincerely mm

0 votes

3 answers

162 views

ANSWER



Fixed with the following command lines:

dpkg -r --force-depends ufraw
dpkg -r --force-depends ufraw-batchwget http://cz.archive.ubuntu.com/ubuntu/pool/universe/u/ufraw/ufraw_0.20-3build1_amd64.deb
wget http://cz.archive.ubuntu.com/ubuntu/pool/universe/u/ufraw/ufraw-batch_0.20-3build1_amd64.deb
wget http://security.ubuntu.com/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.54-1ubuntu1.1_amd64.deb
wget http://ftp.br.debian.org/debian/pool/main/l/lensfun/liblensfun-data_0.2.8-2_all.deb
sudo dpkg -i --force-depends liblensfun-data_0.2.8-2_all.deb
sudo dpkg -i --force-depends libpng12-0_1.2.54-1ubuntu1.1_amd64.deb
sudo dpkg -i --force-depends ufraw-batch_0.20-3build1_amd64.deb
sudo dpkg -i --force-depends ufraw_0.20-3build1_amd64.deb

and check status with apt-get -V -s install ufraw . If there's a line with `Depends: XXXX (>= X.X.X) but it is not installable, ensure the related package is installed

0 votes



The issue is in the specific case where the server is ubuntu bionic using ufraw package with version 0.22-3.1~build0.18.04.1. With xenial distribution and version 0.20-3build1, it works fine.

0 votes



Just a small update, my local docker instance (where it's working) is based on nuxeo/nuxeo:discover-ft

/mm

0 votes



Seeing that the error comes from https://github.com/nuxeo-archives/nuxeo-features/blob/master/nuxeo-platform-imaging/nuxeo-platform-imaging-core/src/main/java/org/nuxeo/ecm/platform/picture/ImagingComponent.java#L192. I do reproduce that it works on the latest version of Nuxeo (master) but not on LTS2019 with HF26. But I cannot tell you the root reason
05/21/2020