Bug 435196

Summary: imagemagickLoader and wmf files
Product: [Applications] digikam Reporter: Kaenguru <GenuesslichMysterioeserTapir>
Component: Plugin-DImg-MagickAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles, metzpinguin
Priority: NOR    
Version First Reported In: 7.2.0   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In: 7.5.0
Sentry Crash Report:
Attachments: sample wmf file
Components used screenshot
Version Info

Description Kaenguru 2021-03-31 18:17:44 UTC
Created attachment 137205 [details]
sample wmf file

I have installed digikam 7.2 from this PPA
https://launchpad.net/~savoury1/+archive/ubuntu/digikam

I still can't display wmf files with it, even though I have Imagemagick 7 on my machine which can display those wmf files.
(I can try to show them using display <filename.wmf>.

So I tried to find out what imagemagick digikam runs. It would be fine I guess, but the make options given to it make me wonder.
I found them in this file:

https://invent.kde.org/graphics/digikam/-/blob/master/project/bundles/3rdparty/ext_imagemagick/CMakeLists.txt

compile options for imagemagick:
    CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=${PREFIX_ext_imagemagick}
                                             --without-freetype
                                             --without-fontconfig
                                             --without-raw
                                             --without-lqr
                                             --without-openjp2
                                             --without-threads
                                             --without-perl
                                             --without-x
                                             --without-heic
                                             --disable-docs
                                             --disable-static
                                             --with-magick-plus-plus
                                             --with-flif
                                             --with-jbig
                                             --with-webp
                                             --with-openexr
                                             --disable-hdri
                                             --with-quantum-depth=16
#                                             --with-utilities=no

I find there is a option for wmf missing. I compared it to the output of my locally installed imagemagick which reads like this:

$ magick --version
Version: ImageMagick 7.0.9-1 Q16 x86_64 2019-10-30 https://imagemagick.org
Copyright: © 1999-2019 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC HDRI OpenMP(4.5) 
Delegates (built-in): bzlib djvu fftw fontconfig freetype jbig jng jpeg lcms lqr lzma openexr pangocairo png tiff wmf x xml zlib

attaching a sample wmf file
Comment 1 Maik Qualmann 2021-03-31 20:18:25 UTC
The WMF file generates this exception in the AppImage:

3139.wmf" ] digikam: NonconformingDrawingPrimitiveDefinition `0' @ error/draw.c/RenderMVGContent/4348

Maik
Comment 2 caulier.gilles 2021-03-31 20:30:59 UTC
Kaenguru :

https://invent.kde.org/graphics/digikam/-/blob/master/project/bundles/3rdparty/ext_imagemagick/CMakeLists.txt

... is for the AppImage bundle build and... it's have no relation with your Ubuntu package

Also as Maik said, the AppImage that we provide is compiled with WMF support. if no explicit option is passed to configure IM, the option is turned on by default.

So, it's not a DK problem do far for me...

Gilles Caulier
Comment 3 caulier.gilles 2021-04-04 09:54:49 UTC
The IM version used by digiKam can be found in Help/Components Info dialog.

Please check if your IM CLI tool as identify, your WMF file can be open without error.

Gilles Caulier
Comment 4 Kaenguru 2021-06-23 08:25:25 UTC
Created attachment 139601 [details]
Components used screenshot
Comment 5 Kaenguru 2021-06-23 08:25:55 UTC
Created attachment 139602 [details]
Version Info
Comment 6 Kaenguru 2021-06-23 17:29:59 UTC
My locally installed imagemagick identifies as:
identify
Version: ImageMagick 7.0.9-1 Q16 x86_64 2019-10-30 https://imagemagick.org

But this is not what the appimage uses, as you can see from the attached screenahot.
https://bugs.kde.org/attachment.cgi?id=139601

(Sorry if I can't handle attachments here properly, feel free to correct. I'm not used to this system)

Imagemagick 7.x can handle my wmf files (for example using display filename.wmf) , IM 6.x can't.
Comment 7 caulier.gilles 2021-06-24 06:26:59 UTC
This problem will be fixed when AppImage will be ported from Mageia6 to Mageia7 after 7.3.0 release.

Gilles Caulier
Comment 8 caulier.gilles 2022-01-08 16:07:25 UTC
Problem fixed with AppImage 7.5.0 build under Mageia7