php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79138 Missing stuff in VC15 package for imagemagicks
Submitted: 2020-01-19 14:25 UTC Modified: 2020-02-02 04:22 UTC
From: elmacbgl at hotmail dot com Assigned: cmb (profile)
Status: No Feedback Package: imagick (PECL)
PHP Version: 7.4.1 OS: Windows
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: elmacbgl at hotmail dot com
New email:
PHP Version: OS:

 

 [2020-01-19 14:25 UTC] elmacbgl at hotmail dot com
Description:
------------
Hi,

I used to work with Image Magick / Imagick, and time is come to update ùy PHP to PHP7.4.1.
I downloaded https://windows.php.net/downloads/pecl/deps/ImageMagick-7.0.7-11-vc15-x86.zip, because I needed a VC15 compiled version of imageMagick, BUT it seems that package has a problem...
When using it in CLI, I got error messages such "UnableToOpenConfigureFile delegates.xml & magic.xml"...
The fact is that they are actually missing from the package...

As a result, the results to my queries are not valid (CMYK files are seens as sRGB, etc...).

When linking with Imagick, PHP seems Imagick, so the library os properly working, BUT the issue remains and is exactly the same than when using image magick in CLI.

Just to test, I copied delegates.xml from the official 7.0.9 version of imagemagick, and now, it seems to work ! (However, I still have the magic.xml error, I will probably find it in github...)

So... the thing is: it SEEMS I fixed the issue, by copying missing files from the official package, however, there must be a cleaner way to do so...
Could you maybe release a complete and working package for 7.0.7 x86 vc15?
Otherwise, what is the solution to my issue ? Maybe some CLI/PHP config to specify there is no config to look for ?
One thing is sure: as it is, ImageMagick-7.0.7-11-vc15-x86.zip does not seem to work without doing something... we had not to do on official releases...

Thanks for helping !

Test script:
---------------
identify.exe -format "%[colorspace]\n" "test.pdf"

With official version of ImageMagick (6.9 or even 7.0.9), it returns:
CMYK

With packaged vc15 version:
identify.exe: UnableToOpenConfigureFile 'magic.xml' @warning/configure.c/GetConfigureOptions/714.
identify.exe: UnableToOpenConfigureFile 'delegates.xml' @warning/configure.c/GetConfigureOptions/714.
identify.exe: LengthAndFileSizeDoNotMatch 'C:\XXX\Temps\magick-219608xxx' @ warning/bmp.c/ReadBMPImage/821
identify.exe: LengthAndFileSizeDoNotMatch 'C:\XXX\Temps\magick-219608xxx' @ warning/bmp.c/ReadBMPImage/821
identify.exe: LengthAndFileSizeDoNotMatch 'C:\XXX\Temps\magick-219608xxx' @ warning/bmp.c/ReadBMPImage/821
identify.exe: LengthAndFileSizeDoNotMatch 'C:\XXX\Temps\magick-219608xxx' @ warning/bmp.c/ReadBMPImage/821
sRGB
sRGB
sRGB
sRGB

And with packaged vc15 version + delegates.xml file found in official 7.0.9:
identify.exe: UnableToOpenConfigureFile 'magic.xml' @warning/configure.c/GetConfigureOptions/714.
CMYK

This is the CLI, but with PHP/Imagick, result is the same (we cannot see error messages, but we see it returns sRGB instead of CMYK, on 7.0.7 vc15, if delegates.xml file is missing.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-01-20 08:20 UTC] cmb@php.net
deps packages are generally not supposed to be used in production;
instead they are meant for development purposes (especially to
build PECL packages).  For all built-in image formats, the PECL
package should be sufficient.  If you need to support image
formats for which there are no built-in codecs, it's probably best
to use an official binary from imagemagick.org; that should solve
the missing delegates.xml issue.  I don't know what magic.xml
would be used for; maybe one of the Imagick package maintainers
can clarify.

Thanks.
 [2020-01-20 11:34 UTC] elmacbgl at hotmail dot com
Hi,

Thank you for your answer.

The thing is: I tried the available official version of Image Magick on imagemagick.org, but using it, imagick extension does not load...
I see 2 possibilities:
* The only Imagick version available for php 7.4 (imagick v3.4.4)  is not compatible with Image Magick 7.0.9
* The official Image Magick is not compiled in VC15, making the dll not to be recognized by imagick...
I suspect the problem is the 2nd option (except my issue, imagick is properly loaded with image magick 7.0.7 vc15 (pecl/deps revision).

So... This is why I'd like to find a working vc15 version of image magick, but it seems I won't find it on the official website...

Bests,
AL
 [2020-01-20 12:50 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2020-01-20 12:50 UTC] cmb@php.net
Okay.  Please provide a self-contained minimal reproduce script.
 [2020-02-02 04:22 UTC] pecl-dev at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Sep 18 08:03:35 2021 UTC