Topic: ImageMagick 6.8.9-7 problem

Hello,

I've updated ImageMagick on our RHEL 6.5 machines to version 6.8.9-7 and noticed that ghostscript is no longer listed at the Delegates :-(

Version: ImageMagick 6.8.9-7 Q16 x86_64 2014-09-19 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC Modules OpenMP
Delegates: bzlib cairo djvu fftw fontconfig freetype jng jpeg lcms ltdl openexr pangocairo png rsvg tiff webp wmf x xml zlib

When I check with the convert -list configure command I see that it has been disabled '--with-gslib=no'

Was this done for a specific reason ?

Regards,
Niels

Re: ImageMagick 6.8.9-7 problem

Yes, delegate is broken with old ghostscript version (EL-5 and EL-6)
Not using "delegate" doesn't means you cannot convert to PDF or PS, just that it uses another way.

See
http://forums.famillecollet.com/viewtopic.php?id=2914
http://forums.famillecollet.com/viewtopic.php?id=2898
http://www.imagemagick.org/discourse-se … mp;t=26260

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: ImageMagick 6.8.9-7 problem

Hello Remi,

I've read the other topics and that is not an option for us :-(

Regards,
Niels

Re: ImageMagick 6.8.9-7 problem

What is the problem ?
What doesn't work with new build ?

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: ImageMagick 6.8.9-7 problem

Hello Remi,

My problem is this, I take a PDF and extract the preview of the first page and with the current package that fails.

$convert -density 100 -resize 100x100 ./data/download/serval:BIB_412D9F718C72.P001_REF[0] ./data/preview/serval:BIB_0CD422FE213A.P001_SCREEN.jpg
convert: impossible d'ouvrir l'image `BIB_412D9F718C72.P001_REF': Aucun fichier ou dossier de ce type @ error/blob.c/OpenBlob/2658.
convert: pas de délégué pour décoder ce format d'image `P001_REF' @ error/constitute.c/ReadImage/501.
convert: pas d'images définies `./data/preview/serval:BIB_0CD422FE213A.P001_SCREEN.jpg' @ error/convert.c/ConvertImageCommand/3187.

This was always working before with the package that I got from here.

If I extract all of it, it works fine.

$convert -density 100 -resize 100x100 ./data/download/serval:BIB_412D9F718C72.P001_REF ./data/preview/serval:BIB_0CD422FE213A.P001_SCREEN.jpg

Regards,
Niels

Re: ImageMagick 6.8.9-7 problem

Some more info :

With the version that comes with RHEL6 it works fine, but this version is way to old.

$convert -density 100 -resize 100x100 ./exemple_pdf_problem_2014_10.pdf[0] ./exemple_preview_problem_2014_10.jpg
$convert -density 100 -resize 100x100 ./serval\:BIB_412D9F718C72.P001_REF[0] ./exemple_preview_problem_2014_10.jpg
$convert -density 100 -resize 100x100 ./serval:BIB_412D9F718C72.P001_REF[0] ./exemple_preview_problem_2014_10.jpg

With the latest version from Remi 1 that works on 3 tries :

$convert -density 100 -resize 100x100 ./exemple_pdf_problem_2014_10.pdf[0] ./exemple_preview_problem_2014_10.jpg
$convert -density 100 -resize 100x100 ./serval\:BIB_412D9F718C72.P001_REF[0] ./exemple_preview_problem_2014_10.jpg
convert: impossible d'ouvrir l'image `BIB_412D9F718C72.P001_REF': Aucun fichier ou dossier de ce type @ error/blob.c/OpenBlob/2658.
convert: pas de délégué pour décoder ce format d'image `P001_REF' @ error/constitute.c/ReadImage/501.
convert: pas d'images définies `./exemple_preview_problem_2014_10.jpg' @ error/convert.c/ConvertImageCommand/3187.
convert -density 100 -resize 100x100 ./serval:BIB_412D9F718C72.P001_REF[0] ./exemple_preview_problem_2014_10.jpg
convert: impossible d'ouvrir l'image `BIB_412D9F718C72.P001_REF': Aucun fichier ou dossier de ce type @ error/blob.c/OpenBlob/2658.
convert: pas de délégué pour décoder ce format d'image `P001_REF' @ error/constitute.c/ReadImage/501.
convert: pas d'images définies `./exemple_preview_problem_2014_10.jpg' @ error/convert.c/ConvertImageCommand/3187.

Re: ImageMagick 6.8.9-7 problem

Can you paste those files somewhere I can run some test ?

BTW, the main goal of remi repository is PHP.
So ImageMagick-last is mostly there to get all the featues available in php-pecl-imagick and php-magicwand.
And IMageMagick-last-libs (used but php) can be installed beside system ImageMagick-last.

So this issue, which only occurs when both imagick and gd are installed, is very strange... and really not easy to debug (And I already spent hours on it).

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: ImageMagick 6.8.9-7 problem

Hello,

I'm not able to give you those PDF's but for testing any PDF will do, I've also used a basic PDF and had the same result.

For now our workaround is to rename our files that have the ":" sign and then it will work, which is crap because we first have to
copy it somewhere and then rename it.

We use ImageMagick with Camel.

Regards,
Niels

Re: ImageMagick 6.8.9-7 problem

Ok, so the issue is because of the special ":" in the file name.

I will try to see what happen internally, but obviously ":" have some special meaning.

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: ImageMagick 6.8.9-7 problem

Found a explanation / simpler workaround

$ convert -density 100 -resize 100x100 foo:bar.pdf[0] foo.jpg
convert: unable to open image `bar.pdf': Aucun fichier ou dossier de ce type @ error/blob.c/OpenBlob/2658.
convert: no images defined `foo.jpg' @ error/convert.c/ConvertImageCommand/3187.

":" is a delimiter for image type, so "foo" is used as an image type, which explain the failure.
Giving a explicit image type (pdf:) allow to workaround this

$ convert -density 100 -resize 100x100 pdf:foo:bar.pdf[0] foo.jpg
$ file foo.jpg
foo.jpg: JPEG image data, JFIF standard 1.01

And avoid having to copy the file.

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: ImageMagick 6.8.9-7 problem

Feel free to report this to ImageMagick upstream if you really think this is a bug.

But reading the code... I don't see any trivial way to handle "type:name[0]" properly.
There is some hack to allow ':' in path in some cases but "before" subimage parsing, so not working in "this" case.

Sorry, but I think I have do all what I can, my best, for a best effort / community support.

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: ImageMagick 6.8.9-7 problem

Thanks for your help, we found a solution that suit our needs by getting the PDF through an access httpd
this works with the ':' char in name.

Re: ImageMagick 6.8.9-7 problem

Nice smile

Closing this thread.

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi