Page 4 of 5

Re: Imagemagick PHP stopped working on update

Posted: 2016-05-30T14:11:16-07:00
by iwantmedia
Bonzo wrote:I have lost track are you on a Linux or windows server?
the site is hosted on a linux server. I am using dreamweaver cc to edit the php files.

Re: Imagemagick PHP stopped working on update

Posted: 2016-05-30T14:21:50-07:00
by Bonzo
I should say I tend to use " as it should work on a windows or Linux setup whereas ' will not work on a windows setup.

Re: Imagemagick PHP stopped working on update

Posted: 2016-05-30T14:42:02-07:00
by iwantmedia
ok spaces removed and line breaks removed. Here is the $cmd that is returned but i still have the issue of {-draw} {color} {1,0} {floodfill}

Re: Imagemagick PHP stopped working on update

Posted: 2016-05-30T15:08:39-07:00
by fmw42
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
Your ISP has NOT installed (properly?) lscm or it would show in the list of delegates. I believe that is the root cause of your problem! I mentioned this on the second page of this topic at viewtopic.php?f=2&t=29747&start=15#p133825. If they claim to have installed it, it either did not install correctly or they did not re-install Imagemagick afterwards.

It is clear that you cannot use -draw even for the simplest command that I gave.

Code: Select all

convert -size 200x200 xc:black -fill white -draw "rectangle 50,50 150,150" test1.jpg
It should have been a white square in a black background. That did not work. Once you get lcms installed properly, and my simple test works, then you should be able to use the exact following command, which works for me on my Mac OSX with IM 6.9.4.4. Q16.

Code: Select all

convert \( 3_Queens_Parade_300_x_220_8.jpg -write mpr:image +delete \) \
\( 045a-top.png -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 60x60+60 -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

Re: Imagemagick PHP stopped working on update

Posted: 2016-05-30T15:39:59-07:00
by fmw42
If your ISP does not believe this, then have them do

Code: Select all

convert -list configure
Path: /usr/local/lib/ImageMagick-6.9.4//config-Q16/configure.xml

Name Value
-------------------------------------------------------------------------------
CC gcc -std=gnu99 -std=gnu99
CFLAGS -I/opt/local/include/libxml2 -I/opt/local/include/cairo -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/pixman-1 -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include -D_REENTRANT -I/opt/local/include/librsvg-2.0 -I/opt/local/include/gdk-pixbuf-2.0 -I/opt/local/include/libpng16 -I/opt/local/include/cairo -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/pixman-1 -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include -I/opt/local/include/libpng16 -D_THREAD_SAFE -I/opt/local/include/OpenEXR -I/opt/local/include -I/opt/local/include/lqr-1 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/openjpeg-2.1 -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include -fopenmp -g -O2 -Wall -mtune=core2 -fexceptions -D_FORTIFY_SOURCE=0 -D_THREAD_SAFE -pthread -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16
CODER_PATH /usr/local/lib/ImageMagick-6.9.4/modules-Q16/coders
CONFIGURE ./configure 'CPPFLAGS=-I/opt/local/include' 'LDFLAGS=-L/opt/local/lib' '--enable-delegate-build' '--enable-shared' '--disable-static' '--disable-opencl' '--with-modules' '--with-quantum-depth=16' '--with-gslib' '--without-wmf' '--with-rsvg' '--disable-silent-rules' '--disable-dependency-tracking' '--without-pango' '--with-gs-font-dir=/opt/local/share/ghostscript/fonts/' '--with-lqr' 'PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/opt/local/lib/pkgconfig'
CONFIGURE_PATH /usr/local/etc/ImageMagick-6/
COPYRIGHT Copyright (C) 1999-2016 ImageMagick Studio LLC
CPPFLAGS -I/usr/local/include/ImageMagick-6
CXX g++
CXXFLAGS -g -O2 -D_THREAD_SAFE -pthread
DEFS -DHAVE_CONFIG_H
DELEGATES bzlib mpeg fftw fontconfig freetype gslib jbig jng jpeg lcms lqr lzma openexr openjp2 png ps rsvg tiff webp x xml zlib
DISTCHECK_CONFIG_FLAGS 'CPPFLAGS=-I/opt/local/include' 'LDFLAGS=-L/opt/local/lib' --disable-deprecated --with-quantum-depth=16 --with-jemalloc=no --with-umem=no --with-autotrace=no --with-fontpath= --with-gs-font-dir=/opt/local/share/ghostscript/fonts/ --with-pango=no --with-wmf=no --with-perl=no
DOCUMENTATION_PATH /usr/local/share/doc/ImageMagick-6
EXEC-PREFIX /usr/local
EXECUTABLE_PATH /usr/local/bin
FEATURES DPC Cipher OpenMP Modules
FILTER_PATH /usr/local/lib/ImageMagick-6.9.4/modules-Q16/filters
GIT_REVISION 10794
HOST x86_64-apple-darwin10.8.0
INCLUDE_PATH /usr/local/include/ImageMagick-6
LDFLAGS -L/usr/local/lib -L/opt/local/lib -L/Users/fred/applications/ImageMagick-6.9.4-4/magick -L/Users/fred/applications/ImageMagick-6.9.4-4/wand
LIB_VERSION 0x694
LIB_VERSION_NUMBER 6,9,4,4
LIBRARY_PATH /usr/local/lib/ImageMagick-6.9.4
LIBS -L/opt/local/lib -llcms2 -L/opt/local/lib -lfreetype -L/opt/local/lib -llqr-1 -lglib-2.0 -lintl -L/opt/local/lib -lfftw3 -L/opt/local/lib -lfontconfig -lfreetype -lXext -lSM -lICE -lX11 -lXt -L/opt/local/lib -llzma -lbz2 -L/opt/local/lib -lz -lltdl -lm -lgomp
NAME ImageMagick
PCFLAGS -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16
PREFIX /usr/local
QuantumDepth 16
RELEASE_DATE 2016-05-24
SHARE_PATH /usr/local/share/ImageMagick-6
SHAREARCH_PATH /usr/local/lib/ImageMagick-6.9.4/config-Q16
TARGET_CPU x86_64
TARGET_OS darwin10.8.0
TARGET_VENDOR apple
VERSION 6.9.4
WEBSITE http://www.imagemagick.org

Path: [built-in]

Name Value
-------------------------------------------------------------------------------
FEATURES OpenMP
NAME ImageMagick
QuantumDepth 16

Re: Imagemagick PHP stopped working on update

Posted: 2016-05-30T19:02:23-07:00
by snibgo
Here's another test you can do. Arrange for a text file called, say, mydraw.txt, to contain:

Code: Select all

color 1,0 floodfill
Note: there are no quote characters.

Then change your command, replacing the entire quoted draw argument with @ and the filename:

Code: Select all

-draw @mydraw.txt
If this works, then you have a solution. Not a good one, but it would work, and would show that at least one problem is in the quoting. (I suspect your other quotes eg 'rgb()' are also ineffective, but they are not required.)

It is possible that you have two problems: quotes and lcms.

EDIT: You probably need to supply the full pathname to the text file.

Code: Select all

-draw @/path/to/mydraw.txt

Re: Imagemagick PHP stopped working on update

Posted: 2016-05-30T19:06:25-07:00
by fmw42
If he uses single quotes (not backtics) as I wrote, the quotes should not be an issue on Unix. But it would not hurt to test snibgo's suggestion in a simple draw command first.

Re: Imagemagick PHP stopped working on update

Posted: 2016-05-30T22:41:47-07:00
by iwantmedia
snibgo wrote:Here's another test you can do. Arrange for a text file called, say, mydraw.txt, to contain:

Code: Select all

color 1,0 floodfill
Note: there are no quote characters.

Then change your command, replacing the entire quoted draw argument with @ and the filename:

Code: Select all

-draw @mydraw.txt
If this works, then you have a solution. Not a good one, but it would work, and would show that at least one problem is in the quoting. (I suspect your other quotes eg 'rgb()' are also ineffective, but they are not required.)

It is possible that you have two problems: quotes and lcms.

EDIT: You probably need to supply the full pathname to the text file.

Code: Select all

-draw @/path/to/mydraw.txt
Single quotes work on the 'rgb ()' and that works fine. It now seems to be the draw command with the 'color 1,0 floodfill' being separated.

The script is dynamic because depending on what the user chooses it adds a border or two & the chosen frame. It is doing the borders ok & adds the frame placeholder at the right thickness it just isn't adding the image to tile around the edge.

The options are fetched from a database depending on user selection.

View the tool so you can see what I mean at www.westendframes.co.uk/framing-studio/start

I am awaiting another response from three hosting company regarding the delegates.

Tom

Re: Imagemagick PHP stopped working on update

Posted: 2016-05-30T23:27:02-07:00
by fmw42
I am a bit puzzled by your mention of script, database and the link to the interface software.

Can I assume you that you actually tested the following exact command separate from your front end interface software and that it did not work?

Code: Select all

convert \( 3_Queens_Parade_300_x_220_8.jpg -write mpr:image +delete \) \
\( 045a-top.png -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 60x60+60 -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
And that you tested independently my simple command and it failed:

Code: Select all

convert -size 200x200 xc:black -fill white -draw "rectangle 50,50 150,150" test1.jpg
If so, since the second command did not have single quotes and failed to draw the white inner box, then I would still assume the issue is lcms. I do not know what else -draw might be dependent upon.

Re: Imagemagick PHP stopped working on update

Posted: 2016-05-30T23:39:39-07:00
by fmw42
Delegates (built-in): bzlib cairo djvu fontconfig freetype gslib jng jpeg ltdl openexr pangocairo png ps rsvg tiff wmf x xml zlib
The only other oddity is that you seem to have two pango versions installed, cairo and pangocairo. I do not know enought about them.

It is strange that you say your 'rgb(...)' color works, but -draw does not. -draw depends upon MVG (xml?). Might you have an old or badly installed xml? See http://www.imagemagick.org/script/magic ... aphics.php.

Re: Imagemagick PHP stopped working on update

Posted: 2016-05-30T23:51:04-07:00
by fmw42
It is strange that you say your 'rgb(...)' color works, but -draw does not. -draw depends upon MVG (I believe from xml, though not sure). Might you have an old or badly installed xml? See http://www.imagemagick.org/script/magic ... aphics.php.

When you do

Code: Select all

convert -list format
what do you get for

MSVG SVG rw+ ImageMagick's own SVG internal renderer
SVG SVG rw+ Scalable Vector Graphics (RSVG 2.40.12)

Re: Imagemagick PHP stopped working on update

Posted: 2016-05-30T23:55:30-07:00
by fmw42
From http://www.imagemagick.org/Usage/draw/, does the following work?

Code: Select all

convert -debug all -size 100x60 xc:skyblue -fill white -stroke black -draw "rectangle 20,10 80,50" draw_rect.gif
If not what error message do you get?

Perhaps something went wrong with the IM install regarding the draw.c code?

This command works for me under im6939.

Code: Select all

im6939 convert -size 100x60 xc:skyblue -fill white -stroke black -draw "rectangle 20,10 80,50" draw_rect.gif
So in principle, 6.9.3.9 is not flawed in regard to -draw.

Re: Imagemagick PHP stopped working on update

Posted: 2016-05-31T00:01:45-07:00
by iwantmedia
fmw42 wrote:It is strange that you say your 'rgb(...)' color works, but -draw does not. -draw depends upon MVG (I believe from xml, though not sure). Might you have an old or badly installed xml? See http://www.imagemagick.org/script/magic ... aphics.php.

When you do

Code: Select all

convert -list format
what do you get for

MSVG SVG rw+ ImageMagick's own SVG internal renderer
SVG SVG rw+ Scalable Vector Graphics (RSVG 2.40.12)
I get a lot of results but the ones you have mentioned:
[132] => MSVG SVG rw+ ImageMagick's own SVG internal renderer
[208] => SVG SVG rw+ Scalable Vector Graphics (RSVG 2.26.0)

Re: Imagemagick PHP stopped working on update

Posted: 2016-05-31T00:04:04-07:00
by fmw42
That looks fine. I am not 100% sure about lcms, but you should have it anyway. Seems to be something wrong with the install of Imagemagick and draw.c. Try some of the simple commands at http://www.imagemagick.org/Usage/draw/#primitives and see if any of them work.

Re: Imagemagick PHP stopped working on update

Posted: 2016-05-31T00:37:46-07:00
by snibgo
My current theory is that rgb ...

Code: Select all

'rgb(107,15,15)'
... would work without the quotes, so we wouldn't know if the quotes are being ignored.

However, this ...

Code: Select all

-draw 'color 1,0 floodfill'
... needs the quotes in order to keep the three space-separated "words" together in a single argument. The symptoms are consistent with the quotes being ignored.

We still haven't seen the value of $CMD. This could provide a valuable clue.