Imagemagick PHP stopped working on update

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
iwantmedia
Posts: 22
Joined: 2016-05-21T14:59:43-07:00
Authentication code: 1151

Re: Imagemagick PHP stopped working on update

Post by iwantmedia » 2016-05-30T12:23:56-07:00

I've check the php file and all seems ok.
I have added the path to convert and the result is still the same.
I have spoken with the hosting provider and they have tested imagemagick and said they did all checks when updated and recompiled lcms etc.

I can't believe how many hours i have spent playing with the code making alterations and testing and it's still not working. The script hasn't changed in months so i can't see why it isn't working. The only things i can think of is a folder permissions issue or imagemagick update & something is not supported.

When trying different code with some form of error reporting on...
when using this code:
$cmd = "convert '../img/gallery/3_Queens_Parade_300_x_220_8.jpg' -write mpr:image +delete \ ".
"045a-top.jpg -write mpr:edge_top +delete \ ".
"045a-bottom.jpg -rotate 180 -write mpr:edge_btm +delete \ ".
"mpr:image -alpha set -bordercolor 'rgb(107,15,15)' -border 80 \ ".
"-compose Dst -frame 24x24+24 -compose over \ ".
"-transverse -tile mpr:edge_btm -draw `color 1,0 floodfill` -transpose -draw `color 1,0 floodfill` \ ".
"-transverse -tile mpr:edge_top -draw `color 1,0 floodfill` -transpose -draw `color 1,0 floodfill` \ ".
"mpr:image -gravity center -compose over -composite \ ".
"result.jpg 2>&1";
exec($cmd, $array);

i get this error result:
Array ( [0] => convert.x: non-conforming drawing primitive definition `-' @ error/draw.c/DrawImage/3171. [1] => convert.x: non-conforming drawing primitive definition `mpr' @ error/draw.c/DrawImage/3171. [2] => convert.x: no images defined `result.jpg' @ error/convert.c/ConvertImageCommand/3252. )

---------------

when using this code:
$cmd = "convert '../img/gallery/3_Queens_Parade_300_x_220_8.jpg' -write mpr:image +delete \ ".
"045a-top.jpg -write mpr:edge_top +delete \ ".
"045a-bottom.jpg -rotate 180 -write mpr:edge_btm +delete \ ".
"mpr:image -alpha set -bordercolor 'rgb(107,15,15)' -border 80 \ ".
"-compose Dst -frame 24x24+24 -compose over \ ".
"-transverse -tile mpr:edge_btm -draw 'color 1,0 floodfill' -transpose -draw 'color 1,0 floodfill' \ ".
"-transverse -tile mpr:edge_top -draw 'color 1,0 floodfill' -transpose -draw 'color 1,0 floodfill' \ ".
"mpr:image -gravity center -compose over -composite \ ".
"result.jpg 2>&1";
exec($cmd, $array);

i get this error result:
Array ( [0] => convert.x: non-conforming drawing primitive definition `color' @ error/draw.c/DrawImage/3171. [1] => convert.x: unable to open image `1,0': No such file or directory @ error/blob.c/OpenBlob/2702. [2] => convert.x: unable to open image `1,0': No such file or directory @ error/blob.c/OpenBlob/2702. [3] => convert.x: no decode delegate for this image format `' @ error/constitute.c/ReadImage/501. [4] => convert.x: unable to open image `floodfill': No such file or directory @ error/blob.c/OpenBlob/2702. [5] => convert.x: unable to open image `floodfill': No such file or directory @ error/blob.c/OpenBlob/2702. [6] => convert.x: no decode delegate for this image format `' @ error/constitute.c/ReadImage/501. [7] => convert.x: non-conforming drawing primitive definition `color' @ error/draw.c/DrawImage/3171. [8] => convert.x: unable to open image `1,0': No such file or directory @ error/blob.c/OpenBlob/2702. [9] => convert.x: unable to open image `1,0': No such file or directory @ error/blob.c/OpenBlob/2702. [10] => convert.x: no decode delegate for this image format `' @ error/constitute.c/ReadImage/501. [11] => convert.x: unable to open image `floodfill': No such file or directory @ error/blob.c/OpenBlob/2702. [12] => convert.x: unable to open image `floodfill': No such file or directory @ error/blob.c/OpenBlob/2702. [13] => convert.x: no decode delegate for this image format `' @ error/constitute.c/ReadImage/501. [14] => convert.x: non-conforming drawing primitive definition `color' @ error/draw.c/DrawImage/3171. [15] => convert.x: unable to open image `1,0': No such file or directory @ error/blob.c/OpenBlob/2702. [16] => convert.x: unable to open image `1,0': No such file or directory @ error/blob.c/OpenBlob/2702. [17] => convert.x: no decode delegate for this image format `' @ error/constitute.c/ReadImage/501. [18] => convert.x: unable to open image `floodfill': No such file or directory @ error/blob.c/OpenBlob/2702. [19] => convert.x: unable to open image `floodfill': No such file or directory @ error/blob.c/OpenBlob/2702. [20] => convert.x: no decode delegate for this image format `' @ error/constitute.c/ReadImage/501. [21] => convert.x: non-conforming drawing primitive definition `color' @ error/draw.c/DrawImage/3171. [22] => convert.x: unable to open image `1,0': No such file or directory @ error/blob.c/OpenBlob/2702. [23] => convert.x: unable to open image `1,0': No such file or directory @ error/blob.c/OpenBlob/2702. [24] => convert.x: no decode delegate for this image format `' @ error/constitute.c/ReadImage/501. [25] => convert.x: unable to open image `floodfill': No such file or directory @ error/blob.c/OpenBlob/2702. [26] => convert.x: unable to open image `floodfill': No such file or directory @ error/blob.c/OpenBlob/2702. [27] => convert.x: no decode delegate for this image format `' @ error/constitute.c/ReadImage/501. [28] => convert.x: non-conforming drawing primitive definition `color' @ error/draw.c/DrawImage/3171. )

it all seems to be to do with the color command.

my client is getting very frustrated as i have been investigating and trying to fix this for 2 weeks now.

thanks tom

User avatar
fmw42
Posts: 25149
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Imagemagick PHP stopped working on update

Post by fmw42 » 2016-05-30T12:41:38-07:00

What do you now get from

Code: Select all

convert -version
I want to see that it has lcms in the delegates. After that we can try some simple draw commands and see if we can pin down where it is failing.

try these two commands:

Code: Select all

convert -size 200x200 xc:black -fill white -draw "rectangle 50,50 150,150" test1.jpg

Code: Select all

convert test1.jpg -fuzz 5% -fill red -draw "color 100,100 floodfill" test2.jpg

snibgo
Posts: 11820
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Imagemagick PHP stopped working on update

Post by snibgo » 2016-05-30T12:51:52-07:00

Your latest version uses back-quotes around the draw string. I don't know PHP, but I expect that would cause a problem.

Please echo or print the value of $CMD and paste the result here.
snibgo's IM pages: im.snibgo.com

User avatar
fmw42
Posts: 25149
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Imagemagick PHP stopped working on update

Post by fmw42 » 2016-05-30T12:55:51-07:00

snibgo wrote:Your latest version uses back-quotes around the draw string. I don't know PHP, but I expect that would cause a problem.

Please echo or print the value of $CMD and paste the result here.

I do not see backquotes in the actual command, which would have caused a problem. The error message does show backquotes, but I believe that is the way the error messages are written to make the error stand out. In his actual command he has single quotes as best I can tell, which should be fine. I had him even try \' and \" escaped quotes, but that did not seem to work.

iwantmedia
Posts: 22
Joined: 2016-05-21T14:59:43-07:00
Authentication code: 1151

Re: Imagemagick PHP stopped working on update

Post by iwantmedia » 2016-05-30T12:58:40-07:00

fmw42 wrote:
snibgo wrote:Your latest version uses back-quotes around the draw string. I don't know PHP, but I expect that would cause a problem.

Please echo or print the value of $CMD and paste the result here.

I do not see backquotes in the actual command, which would have caused a problem. The error message does show backquotes, but I believe that is the way the error messages are written to make the error stand out. In his actual command he has single quotes as best I can tell, which should be fine. I had him even try \' and \" escaped quotes, but that did not seem to work.
i have tried quoting different parts of the command, i've tried single quotes, double quotes both with & without escaping.
', \', ", \", `, \`

User avatar
fmw42
Posts: 25149
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Imagemagick PHP stopped working on update

Post by fmw42 » 2016-05-30T13:00:08-07:00

Yes, I believe you have tried these various quotes and are using a proper single quote. Tell me what you get from convert -version and test the two simple commands above and let me know if either have an error message or if you get a proper image. The first command will make a black image with a white square in the middle. The second will convert the white square to a red square using the -draw "color coords floodfill" command you used. Lets see if this works. If it does, then we can work on your command by simpifying it until we find where it fails.

iwantmedia
Posts: 22
Joined: 2016-05-21T14:59:43-07:00
Authentication code: 1151

Re: Imagemagick PHP stopped working on update

Post by iwantmedia » 2016-05-30T13:04:05-07:00

fmw42 wrote:What do you now get from

Code: Select all

convert -version
I want to see that it has lcms in the delegates. After than we can try some simple draw commands and see if we can pin down where it is failing.

try these two commands:

Code: Select all

convert -size 200x200 xc:black -fill white -draw "rectangle 50,50 150,150" test1.jpg

Code: Select all

convert test1.jpg -fuzz 5% -fill red -draw "color 100,100 floodfill" test2.jpg
version:
Version: ImageMagick 6.9.3-9 Q16 x86_64 2016-05-04 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2016 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC Modules OpenMP
Delegates (built-in): bzlib cairo djvu fontconfig freetype gslib jng jpeg ltdl openexr pangocairo png ps rsvg tiff wmf x xml zlib

test 1: Image
Array ( [0] => convert.x: non-conforming drawing primitive definition `rectangle' @ error/draw.c/DrawImage/3171. [1] => convert.x: unable to open image `50,50': No such file or directory @ error/blob.c/OpenBlob/2702. [2] => convert.x: unable to open image `50,50': No such file or directory @ error/blob.c/OpenBlob/2702. [3] => convert.x: no decode delegate for this image format `' @ error/constitute.c/ReadImage/501. [4] => convert.x: unable to open image `150,150': No such file or directory @ error/blob.c/OpenBlob/2702. [5] => convert.x: unable to open image `150,150': No such file or directory @ error/blob.c/OpenBlob/2702. [6] => convert.x: no decode delegate for this image format `' @ error/constitute.c/ReadImage/501. [7] => convert.x: non-conforming drawing primitive definition `rectangle' @ error/draw.c/DrawImage/3171. )

test 2: Image
Array ( [0] => convert.x: non-conforming drawing primitive definition `color' @ error/draw.c/DrawImage/3171. [1] => convert.x: unable to open image `100,100': No such file or directory @ error/blob.c/OpenBlob/2702. [2] => convert.x: unable to open image `100,100': No such file or directory @ error/blob.c/OpenBlob/2702. [3] => convert.x: no decode delegate for this image format `' @ error/constitute.c/ReadImage/501. [4] => convert.x: unable to open image `floodfill': No such file or directory @ error/blob.c/OpenBlob/2702. [5] => convert.x: unable to open image `floodfill': No such file or directory @ error/blob.c/OpenBlob/2702. [6] => convert.x: no decode delegate for this image format `' @ error/constitute.c/ReadImage/501. [7] => convert.x: non-conforming drawing primitive definition `color' @ error/draw.c/DrawImage/3171. )
Last edited by iwantmedia on 2016-05-30T13:27:56-07:00, edited 1 time in total.

snibgo
Posts: 11820
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Imagemagick PHP stopped working on update

Post by snibgo » 2016-05-30T13:06:24-07:00

When trying different code with some form of error reporting on...
when using this code:
$cmd = "convert '../img/gallery/3_Queens_Parade_300_x_220_8.jpg' -write mpr:image +delete \ ".
"045a-top.jpg -write mpr:edge_top +delete \ ".
"045a-bottom.jpg -rotate 180 -write mpr:edge_btm +delete \ ".
"mpr:image -alpha set -bordercolor 'rgb(107,15,15)' -border 80 \ ".
"-compose Dst -frame 24x24+24 -compose over \ ".
"-transverse -tile mpr:edge_btm -draw `color 1,0 floodfill` -transpose
The quote before "color" is a back-quote.

But it may have been transformed somewhere.

What is the value of $CMD?

Another test: put "-debug all" (without quotes) as the first option after "convert". Near the top of the output, "convert" will list its options, each in brackets {}. Please copy-paste them here.
snibgo's IM pages: im.snibgo.com

User avatar
fmw42
Posts: 25149
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Imagemagick PHP stopped working on update

Post by fmw42 » 2016-05-30T13:10:36-07:00

Sorry, snibgo, you are correct. In his first command he has backticks. I was looking at the second command, which has proper single quotes.

iwantmedia
Posts: 22
Joined: 2016-05-21T14:59:43-07:00
Authentication code: 1151

Re: Imagemagick PHP stopped working on update

Post by iwantmedia » 2016-05-30T13:19:43-07:00

snibgo wrote:
When trying different code with some form of error reporting on...
when using this code:
$cmd = "convert '../img/gallery/3_Queens_Parade_300_x_220_8.jpg' -write mpr:image +delete \ ".
"045a-top.jpg -write mpr:edge_top +delete \ ".
"045a-bottom.jpg -rotate 180 -write mpr:edge_btm +delete \ ".
"mpr:image -alpha set -bordercolor 'rgb(107,15,15)' -border 80 \ ".
"-compose Dst -frame 24x24+24 -compose over \ ".
"-transverse -tile mpr:edge_btm -draw `color 1,0 floodfill` -transpose
The quote before "color" is a back-quote.

But it may have been transformed somewhere.

What is the value of $CMD?

Another test: put "-debug all" (without quotes) as the first option after "convert". Near the top of the output, "convert" will list its options, each in brackets {}. Please copy-paste them here.
i have tried many different things. The single back-quote seemed to be the one with the least amount of errors reported.

when printing the $cmd:
convert -debug all '../img/gallery/3_Queens_Parade_300_x_220_8.jpg' -write mpr:image +delete \ 045a-top.jpg -write mpr:edge_top +delete \ 045a-bottom.jpg -rotate 180 -write mpr:edge_btm +delete \ mpr:image -alpha set -bordercolor 'rgb(107,15,15)' -border 80 \ -compose Dst -frame 24x24+24 -compose over \ -transverse -tile mpr:edge_btm -draw 'color 1,0 floodfill' -transpose -draw 'color 1,0 floodfill' \ -transverse -tile mpr:edge_top -draw 'color 1,0 floodfill' -transpose -draw 'color 1,0 floodfill' \ mpr:image -gravity center -compose over -composite \ result.jpg 2>&1

I have added -debug all to the command with the single quote but get no errors or output, am i doing this correctly.
$cmd = "convert -debug all '../img/gallery/3_Queens_Parade_300_x_220_8.jpg' -write mpr:image +delete \ ".
"045a-top.jpg -write mpr:edge_top +delete \ ".
"045a-bottom.jpg -rotate 180 -write mpr:edge_btm +delete \ ".
"mpr:image -alpha set -bordercolor 'rgb(107,15,15)' -border 80 \ ".
"-compose Dst -frame 24x24+24 -compose over \ ".
"-transverse -tile mpr:edge_btm -draw 'color 1,0 floodfill' -transpose -draw 'color 1,0 floodfill' \ ".
"-transverse -tile mpr:edge_top -draw 'color 1,0 floodfill' -transpose -draw 'color 1,0 floodfill' \ ".
"mpr:image -gravity center -compose over -composite \ ".
"result.jpg 2>&1";
exec($cmd, $array);
print_r($array);

when running the same above code but with single back-quote i get pages of error codes.
Last edited by iwantmedia on 2016-05-30T13:21:17-07:00, edited 1 time in total.

User avatar
fmw42
Posts: 25149
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Imagemagick PHP stopped working on update

Post by fmw42 » 2016-05-30T13:21:03-07:00

$cmd = "convert '../img/gallery/3_Queens_Parade_300_x_220_8.jpg' -write mpr:image +delete \ ".
"045a-top.jpg -write mpr:edge_top +delete \ ".
"045a-bottom.jpg -rotate 180 -write mpr:edge_btm +delete \ ".
"mpr:image -alpha set -bordercolor 'rgb(107,15,15)' -border 80 \ ".
"-compose Dst -frame 24x24+24 -compose over \ ".
"-transverse -tile mpr:edge_btm -draw 'color 1,0 floodfill' -transpose -draw 'color 1,0 floodfill' \ ".
"-transverse -tile mpr:edge_top -draw 'color 1,0 floodfill' -transpose -draw 'color 1,0 floodfill' \ ".
"mpr:image -gravity center -compose over -composite \ ".
"result.jpg 2>&1";
You should not have any spaces after the new line \

You can try (note space before and after . and no space between \ and ")

Code: Select all

$cmd = "convert '../img/gallery/3_Queens_Parade_300_x_220_8.jpg' -write mpr:image +delete \" . 
"045a-top.jpg -write mpr:edge_top +delete \" . 
"045a-bottom.jpg -rotate 180 -write mpr:edge_btm +delete \" . 
"mpr:image -alpha set -bordercolor 'rgb(107,15,15)' -border 80 \" . 
"-compose Dst -frame 24x24+24 -compose over \" . 
"-transverse -tile mpr:edge_btm -draw 'color 1,0 floodfill' -transpose -draw 'color 1,0 floodfill' \" . 
"-transverse -tile mpr:edge_top -draw 'color 1,0 floodfill' -transpose -draw 'color 1,0 floodfill' \" . 
"mpr:image -gravity center -compose over -composite \" . 
"result.jpg 2>&1";
Or better remove all the new line \ characters. They are not needed if you use the $cmd style of creating your command and may cause problems if there are spaces after the \

I still want to see what you get from convert -version and my test commands.

User avatar
fmw42
Posts: 25149
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Imagemagick PHP stopped working on update

Post by fmw42 » 2016-05-30T13:27:44-07:00

Note I have edited my post above.

iwantmedia
Posts: 22
Joined: 2016-05-21T14:59:43-07:00
Authentication code: 1151

Re: Imagemagick PHP stopped working on update

Post by iwantmedia » 2016-05-30T13:36:15-07:00

fmw42 wrote:
$cmd = "convert '../img/gallery/3_Queens_Parade_300_x_220_8.jpg' -write mpr:image +delete \ ".
"045a-top.jpg -write mpr:edge_top +delete \ ".
"045a-bottom.jpg -rotate 180 -write mpr:edge_btm +delete \ ".
"mpr:image -alpha set -bordercolor 'rgb(107,15,15)' -border 80 \ ".
"-compose Dst -frame 24x24+24 -compose over \ ".
"-transverse -tile mpr:edge_btm -draw 'color 1,0 floodfill' -transpose -draw 'color 1,0 floodfill' \ ".
"-transverse -tile mpr:edge_top -draw 'color 1,0 floodfill' -transpose -draw 'color 1,0 floodfill' \ ".
"mpr:image -gravity center -compose over -composite \ ".
"result.jpg 2>&1";
You should not have any spaces after the new line \

You can try (note space before and after . and no space between \ and ")

Code: Select all

$cmd = "convert '../img/gallery/3_Queens_Parade_300_x_220_8.jpg' -write mpr:image +delete \" . 
"045a-top.jpg -write mpr:edge_top +delete \" . 
"045a-bottom.jpg -rotate 180 -write mpr:edge_btm +delete \" . 
"mpr:image -alpha set -bordercolor 'rgb(107,15,15)' -border 80 \" . 
"-compose Dst -frame 24x24+24 -compose over \" . 
"-transverse -tile mpr:edge_btm -draw 'color 1,0 floodfill' -transpose -draw 'color 1,0 floodfill' \" . 
"-transverse -tile mpr:edge_top -draw 'color 1,0 floodfill' -transpose -draw 'color 1,0 floodfill' \" . 
"mpr:image -gravity center -compose over -composite \" . 
"result.jpg 2>&1";
Or better remove all the new line \ characters. They are not needed if you use the $cmd style of creating your command and may cause problems if there are spaces after the \

I still want to see what you get from convert -version and my test commands.
I have removed all spaces at the end and also new line slash. I also added the debug command and got the following:
Array ( [0] => 2016-05-30T21:33:19+01:00 0:00.000 0.000u 6.9.3 Configure convert.x[77797]: utility.c/ExpandFilenames/940/Configure [1] => Command line: /usr/bin/convert.x {-debug} {all} {../img/gallery/3_Queens_Parade_300_x_220_8.jpg} {-write} {mpr:image} {+delete} {045a-top.jpg} {-write} {mpr:edge_top} {+delete} {045a-bottom.jpg} {-rotate} {180} {-write} {mpr:edge_btm} {+delete} {mpr:image} {-alpha} {set} {-bordercolor} {rgb(107,15,15)} {-border} {80} {-compose} {Dst} {-frame} {24x24+24} {-compose} {over} {-transverse} {-tile} {mpr:edge_btm} {-draw} {color} {1,0} {floodfill} {-transpose} {-draw} {color} {1,0} {floodfill} {-transverse} {-tile} {mpr:edge_top} {-draw} {color} {1,0} {floodfill} {-transpose} {-draw} {color} {1,0} {floodfill} {mpr:image} {-gravity} {center} {-compose} {over} {-composite} {result.jpg} [2] => 2016-05-30T21:33:19+01:00 0:00.000 0.000u 6.9.3 Configure convert.x[77797]: configure.c/GetConfigureOptions/679/Configure [3] => Searching for configure file: "/usr/share/ImageMagick-6/coder.xml" [4] => 2016-05-30T21:33:19+01:00 0:00.000 0.000u 6.9.3 Configure convert.x[77797]: configure.c/GetConfigureOptions/679/Configure [5] => Searching for configure file: "/usr/lib64/ImageMagick-6.9.3//config-Q16/coder.xml" [6] => 2016-05-30T21:33:19+01:00 0:00.000 0.000u 6.9.3 Configure convert.x[77797]: configure.c/GetConfigureOptions/679/Configure [7] => Searching for configure file: "/etc/ImageMagick-6/coder.xml" [8] => 2016-05-30T21:33:19+01:00 0:00.000 0.000u 6.9.3 Configure convert.x[77797]: configure.c/GetConfigureOptions/679/Configure [9] => Searching for configure file: "/usr/share/doc/ImageMagick-6/coder.xml" [10] => 2016-05-30T21:33:19+01:00 0:00.000 0.000u 6.9.3 Configure convert.x[77797]: coder.c/LoadCoderCache/826/Configure [11] => Loading coder configuration file "/etc/ImageMagick-6/coder.xml" ... [12] => 2016-05-30T21:33:19+01:00 0:00.000 0.000u 6.9.3 Module convert.x[77797]: module.c/OpenModule/1286/Module [13] => Searching for module "JPEG" using filename "jpeg.la" [14] => 2016-05-30T21:33:19+01:00 0:00.000 0.000u 6.9.3 Module convert.x[77797]: module.c/GetMagickModulePath/556/Module [15] => Searching for coder module file "jpeg.la" ... [16] => 2016-05-30T21:33:19+01:00 0:00.000 0.000u 6.9.3 Module convert.x[77797]: module.c/OpenModule/1295/Module [17] => Opening module at path "/usr/lib64/ImageMagick-6.9.3//modules-Q16/coders/jpeg.la" [18] => 2016-05-30T21:33:19+01:00 0:00.000 0.000u 6.9.3 Module convert.x[77797]: module.c/OpenModule/1322/Module [19] => Method "RegisterJPEGImage" in module "JPEG" at address 0x7fdbabccdec0 [20] => 2016-05-30T21:33:19+01:00 0:00.000 0.000u 6.9.3 Module convert.x[77797]: module.c/OpenModule/1336/Module [21] => Method "UnregisterJPEGImage" in module "JPEG" at address 0x7fdbabccddb0 [22] => 2016-05-30T21:33:19+01:00 0:00.000 0.000u 6.9.3 Policy convert.x[77797]: policy.c/IsRightsAuthorized/574/Policy [23] => Domain: Path; rights=Read; pattern="../img/gallery/3_Queens_Parade_300_x_220_8.jpg" ... [24] => 2016-05-30T21:33:19+01:00 0:00.000 0.000u 6.9.3 Blob convert.x[77797]: blob.c/OpenBlob/2594/Blob [25] => read 3 magic header bytes [26] => 2016-05-30T21:33:19+01:00 0:00.000 0.000u 6.9.3 Resource convert.x[77797]: resource.c/AcquireMagickResource/313/Resource [27] => Map: 121KB/118KiB/62.495GiB [28] => 2016-05-30T21:33:19+01:00 0:00.000 0.000u 6.9.3 Resource convert.x[77797]: resource.c/RelinquishMagickResource/1005/Resource [29] => Map: 121KB/0B/62.495GiB [30] => 2016-05-30T21:33:19+01:00 0:00.000 0.000u 6.9.3 Cache convert.x[77797]: cache.c/DestroyPixelCache/999/Cache [31] => destroy [32] => 2016-05-30T21:33:19+01:00 0:00.000 0.000u 6.9.3 Configure convert.x[77797]: configure.c/GetConfigureOptions/679/Configure [33] => Searching for configure file: "/usr/share/ImageMagick-6/magic.xml" [34] => 2016-05-30T21:33:19+01:00 0:00.000 0.000u 6.9.3 Configure convert.x[77797]: configure.c/GetConfigureOptions/679/Configure [35] => Searching for configure file: "/usr/lib64/ImageMagick-6.9.3//config-Q16/magic.xml" [36] => 2016-05-30T21:33:19+01:00 0:00.000 0.000u 6.9.3 Configure convert.x[77797]: configure.c/GetConfigureOptions/679/Configure [37] => Searching for configure file: "/etc/ImageMagick-6/magic.xml" [38] => 2016-05-30T21:33:19+01:00 0:00.000 0.000u 6.9.3 Configure convert.x[77797]: configure.c/GetConfigureOptions/679/Configure [39] => Searching for configure file: "/usr/share/doc/ImageMagick-6/magic.xml" [40] => 2016-05-30T21:33:19+01:00 0:00.000 0.000u 6.9.3 Configure convert.x[77797]: magic.c/LoadMagicCache/793/Configure [41] => Loading magic configure file "/etc/ImageMagick-6/magic.xml" ... [42] => 2016-05-30T21:33:19+01:00 0:00.000 0.000u 6.9.3 Policy convert.x[77797]: policy.c/IsRightsAuthorized/574/Policy [43] => Domain: Coder; rights=Read; pattern="JPEG" ... [44] => 2016-05-30T21:33:19+01:00 0:00.000 0.000u 6.9.3 Policy convert.x[77797]: policy.c/IsRightsAuthorized/574/Policy [45] => Domain: Path; rights=Read; pattern="../img/gallery/3_Queens_Parade_300_x_220_8.jpg" ... [46] => 2016-05-30T21:33:19+01:00 0:00.000 0.000u 6.9.3 Blob convert.x[77797]: blob.c/OpenBlob/2594/Blob [47] => read 3 magic header bytes [48] => 2016-05-30T21:33:19+01:00 0:00.000 0.000u 6.9.3 Resource convert.x[77797]: resource.c/AcquireMagickResource/313/Resource [49] => Map: 121KB/118KiB/62.495GiB [50] => 2016-05-30T21:33:19+01:00 0:00.000 0.000u 6.9.3 Coder convert.x[77797]: jpeg.c/JPEGWarningHandler/362/Coder [51] => [../img/gallery/3_Queens_Parade_300_x_220_8.jpg] JPEG Trace: "Start of Image" [52] => 2016-05-30T21:33:19+01:00 0:00.000 0.000u 6.9.3 Coder convert.x[77797]: jpeg.c/JPEGWarningHandler/362/Coder [53] => [../img/gallery/3_Queens_Parade_300_x_220_8.jpg] JPEG Trace: "JFIF APP0 marker: version 1.01, density 1x1 0" [54] => 2016-05-30T21:33:19+01:00 0:00.000 0.000u 6.9.3 Coder convert.x[77797]: jpeg.c/JPEGWarningHandler/362/Coder [55] => [../img/gallery/3_Queens_Parade_300_x_220_8.jpg] JPEG Trace: "Define Quantization Table 0 precision 0" [56] => 2016-05-30T21:33:19+01:00 0:00.000 0.000u 6.9.3 Coder convert.x[77797]: jpeg.c/JPEGWarningHandler/362/Coder [57] => [../img/gallery/3_Queens_Parade_300_x_220_8.jpg] JPEG Trace: "Define Quantization Table 1 precision 0" [58] => 2016-05-30T21:33:19+01:00 0:00.000 0.000u 6.9.3 Coder convert.x[77797]: jpeg.c/JPEGWarningHandler/362/Coder [59] => [../img/gallery/3_Queens_Parade_300_x_220_8.jpg] JPEG Trace: "Start Of Frame 0xc0: width=800, height=587, components=3" [60] => 2016-05-30T21:33:19+01:00 0:00.000 0.000u 6.9.3 Coder convert.x[77797]: jpeg.c/JPEGWarningHandler/362/Coder [61] => [../img/gallery/3_Queens_Parade_300_x_220_8.jpg] JPEG Trace: " Component 1: 2hx2v q=0" [62] => 2016-05-30T21:33:19+01:00 0:00.000 0.000u 6.9.3 Coder convert.x[77797]: jpeg.c/JPEGWarningHandler/362/Coder [63] => [../img/gallery/3_Queens_Parade_300_x_220_8.jpg] JPEG Trace: " Component 2: 1hx1v q=1" [64] => 2016-05-30T21:33:19+01:00 0:00.000 0.000u 6.9.3 Coder convert.x[77797]: jpeg.c/JPEGWarningHandler/362/Coder [65] => [../img/gallery/3_Queens_Parade_300_x_220_8.jpg] JPEG Trace: " Component 3: 1hx1v q=1" [66] => 2016-05-30T21:33:19+01:00 0:00.000 0.000u 6.9.3 Coder convert.x[77797]: jpeg.c/JPEGWarningHandler/362/Coder [67] => [../img/gallery/3_Queens_Parade_300_x_220_8.jpg] JPEG Trace: "Define Huffman Table 0x00" [68] => 2016-05-30T21:33:19+01:00 0:00.000 0.000u 6.9.3 Coder convert.x[77797]: jpeg.c/JPEGWarningHandler/362/Coder [69] => [../img/gallery/3_Queens_Parade_300_x_220_8.jpg] JPEG Trace: " 0 1 5 1 1 1 1 1" [70] => 2016-05-30T21:33:19+01:00 0:00.000 0.000u 6.9.3
PLUS MUCH MUCH MORE

i have edited my response earlier regarding the version & the output of your commands.

snibgo
Posts: 11820
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Imagemagick PHP stopped working on update

Post by snibgo » 2016-05-30T13:46:56-07:00

Good. Your "-debug all" shows where the problem is.
... {mpr:edge_top} {-draw} {color} {1,0} {floodfill} {-transpose} ...
That isn't what you want. The "-draw" argument should be a single argument, not 3 arguments. It should be like this:
... {mpr:edge_top} {-draw} {color 1,0 floodfill} {-transpose} ...
So PHP is disregarding your quotes around the "-draw" argument. That's the problem you need to solve. (Sorry, I dont do PHP.)
snibgo's IM pages: im.snibgo.com

Bonzo
Posts: 2970
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Imagemagick PHP stopped working on update

Post by Bonzo » 2016-05-30T14:09:16-07:00

I have lost track are you on a Linux or windows server?

I can not remember if it makes a difference or not now but I always put a space after the " on a concenated ? line

So "045a-top.jpg -write mpr:edge_top +delete \" .
Would be " 045a-top.jpg -write mpr:edge_top +delete ".

I have just noticed you are escaping the " which you should not do. Also as I said before you need to be carefull
where you break the lines

Code: Select all

$cmd = "convert \"../img/gallery/3_Queens_Parade_300_x_220_8.jpg\" -write mpr:image +delete ". 
" 045a-top.jpg -write mpr:edge_top +delete ". 
" 045a-bottom.jpg -rotate 180 -write mpr:edge_btm +delete ". 
" mpr:image -alpha set -bordercolor \"rgb(107,15,15)\" -border 80 ". 
" -compose Dst -frame 24x24+24 -compose over ". 
" -transverse -tile mpr:edge_btm -draw \"color 1,0 floodfill\" -transpose -draw \"color 1,0 floodfill\" ". 
" -transverse -tile mpr:edge_top -draw \"color 1,0 floodfill\" -transpose -draw \"color 1,0 floodfill\" ". 
" mpr:image -gravity center -compose over -composite ". 
" result.jpg 2>&1";
Last edited by Bonzo on 2016-05-30T14:18:48-07:00, edited 6 times in total.

Post Reply