Page 1 of 1

radial-gradient problem in v7

Posted: 2014-01-14T19:39:12-07:00
by DrEvil

Code: Select all

Version: ImageMagick 7.0.0-0 Q16 x64 2014-01-09 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC Modules HDRI OpenMP
Delegates: bzlib cairo freetype jbig jng jp2 jpeg lcms lqr pangocairo png ps rsvg tiff webp xml zlib

heatmap.mgk

Code: Select all

-gravity center

-print 'Generating Image Buffer\n'
-size 1000x1000

-print 'Rendering Gradient 1\n'
( -size 100x100 radial-gradient: ) -geometry +300+300 -compose Plus -composite
-print 'Rendering Gradient 2\n'
( -size 100x100 radial-gradient: ) -geometry +180+80 -compose Plus -composite
run with

Code: Select all

magick -script heatmap.mgk
This complain about parenthesis

Code: Select all

magick: unbalanced parenthesis `(eof)' in "heatmap.mgk" at line 7,column 17 @ error/magick-cli.c/ProcessScriptOptions/272.
If I put a - in front of radial-gradient it doesn't error like this, however when I attempt to execute the script, it hangs on the first gradient forever.

Re: radial-gradient problem in v7

Posted: 2014-01-14T20:37:59-07:00
by snibgo
"-composite" needs two images, as it wants to add one to the other. But you have only provided one. (You removed "xc:black" from my script.)

Re: radial-gradient problem in v7

Posted: 2014-01-14T20:40:37-07:00
by DrEvil
I can't get xc:black to work in the v7 script either. The script errors

viewtopic.php?f=22&t=24747&start=30#p106865

Re: radial-gradient problem in v7

Posted: 2014-01-14T20:43:08-07:00
by fmw42
What was the exact code you used? Did you try using canvas:black in place of xc:black? Did you provide the -size before using xc:black?

Re: radial-gradient problem in v7

Posted: 2014-01-14T20:50:12-07:00
by DrEvil

Code: Select all

-gravity center

-print 'Generating Image Buffer\n'
-size 1000x1000
#canvas:black

-print 'Rendering Gradient 1\n'
( -size 100x100 -radial-gradient: ) -geometry +300+300 -compose Plus -composite
-print 'Rendering Gradient 2\n'
( -size 100x100 -radial-gradient: ) -geometry +180+80 -compose Plus -composite
-print 'Rendering Gradient 3\n'
( -size 100x100 -radial-gradient: ) -geometry +180+80 -compose Plus -composite

-print 'Colorizing Heatmap\n'
-auto-level
(
	-size 1x250
	gradient:#004-#804
	gradient:#804-#f00
	gradient:#f00-#f80
	gradient:#f80-#ff0
	gradient:#ff0-#ffa
	-append
) -clut

-print 'Writing Heatmap\n'
-write heatmap_coloured.png
-exit
This script hangs on the first gradient. Errors if you comment back in the canvas line(whether it's xc or canvas)

Here's the error with the canvas line in

Code: Select all

C:\Users\DrEvil\Desktop\heatmap>magick -version
Version: ImageMagick 7.0.0-0 Q16 x64 2014-01-09 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC Modules HDRI OpenMP
Delegates: bzlib cairo freetype jbig jng jp2 jpeg lcms lqr pangocairo png ps rsvg tiff webp xml zlib


C:\Users\DrEvil\Desktop\heatmap>magick -script heatmap.mgk
Generating Image Buffer
magick: unable to open image 'black': No such file or directory @ error/blob.c/OpenBlob/2635.
magick: unable to open module file 'C:\Users\DrEvil\.magick\IM_MOD_RL_XC_.dll': No such file or directory @ warning/modu
le.c/GetMagickModulePath/816.
magick: no decode delegate for this image format `black' @ error/constitute.c/ReadImage/558.

C:\Users\DrEvil\Desktop\heatmap>pause

Re: radial-gradient problem in v7

Posted: 2014-01-14T21:13:40-07:00
by fmw42
try a simple command

magick -size 100x100 xc:black tmp.gif
or
magick -size 100x100 xc:"black" tmp.gif

or

magick -size 100x100 canvas:black tmp.gif
or
magick -size 100x100 canvas:"black" tmp.gif


Does that give errors?

In your command is there a space after -size 100x100 and after xc:black (which is currently commented out)?

Re: radial-gradient problem in v7

Posted: 2014-01-14T21:19:24-07:00
by snibgo
Try the command with "-debug all". How far does it get? Does it look for IM_MOD_RL_XC_.dll in a subdirectory of the place you installed it? Is that file (and many other dlls) present? If the file isn't there, or IM isn't looking there, then you have an installation problem. A re-install might cure it.

Re: radial-gradient problem in v7

Posted: 2014-01-14T22:23:48-07:00
by DrEvil
Yes none of those work just running them raw from the command line by itself, no script or pipe file. Same error about black.

Reinstall doesn't do anything different.

BUT If I copy all the files from ImageMagick-7.0.0-Q16\modules\coders into ImageMagick-7.0.0-Q16\ it finally works.

Perhaps this is now an installation problem instead.