radial-gradient problem in v7

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
DrEvil
Posts: 36
Joined: 2014-01-05T16:59:55-07:00
Authentication code: 6789

radial-gradient problem in v7

Post 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.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: radial-gradient problem in v7

Post 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.)
snibgo's IM pages: im.snibgo.com
DrEvil
Posts: 36
Joined: 2014-01-05T16:59:55-07:00
Authentication code: 6789

Re: radial-gradient problem in v7

Post 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
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: radial-gradient problem in v7

Post 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?
DrEvil
Posts: 36
Joined: 2014-01-05T16:59:55-07:00
Authentication code: 6789

Re: radial-gradient problem in v7

Post 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
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: radial-gradient problem in v7

Post 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)?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: radial-gradient problem in v7

Post 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.
snibgo's IM pages: im.snibgo.com
DrEvil
Posts: 36
Joined: 2014-01-05T16:59:55-07:00
Authentication code: 6789

Re: radial-gradient problem in v7

Post 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.
Post Reply