I'm working on the example from ImageMagick called "Gel" Effects on the ImageMagick Example pages.
Instead of executing the ImageMagick script in many steps with intermediary images, I want to do it in ONE step with no intermediary files.
My code looks like this (95% same as the example):
convert.exe -size 150x64 xc:none -fill green
-draw "roundrectangle 10,10 140,54 8,8"
( +clone -alpha extract -blur 0x12 -shade 110x0
-normalize -sigmoidal-contrast 16,60% -evaluate multiply .5
-roll +4+8 +clone -compose Screen -composite ) -compose In -composite
( +clone -alpha extract -blur 0x2 -shade 0x90 -normalize -blur 0x2
+level 60,100% -alpha On ) -compose Multiply -composite
-font Verdana-Bold -pointsize 20 -fill white -stroke black -gravity Center
-annotate 0 "Download" -trim -repage 0x0+7+7
( +clone -background navy -shadow 80x4+4+4 ) +swap -background none -flatten
ButtonTest.png"
These steps are copies of the steps in the example.
The problem is the last clone step:
( +clone -background navy -shadow 80x4+4+4 ) +swap -background none -flatten
cause the otherwise very nice image to become dark. I.e. no dropshadow is added. Up until that step, the one command works very nicely.
Furthermore. IF I save the image before the last step, like this:
convert.exe -size 150x64 xc:none -fill green
-draw "roundrectangle 10,10 140,54 8,8"
( +clone -alpha extract -blur 0x12 -shade 110x0
-normalize -sigmoidal-contrast 16,60% -evaluate multiply .5
-roll +4+8 +clone -compose Screen -composite ) -compose In -composite
( +clone -alpha extract -blur 0x2 -shade 0x90 -normalize -blur 0x2
+level 60,100% -alpha On ) -compose Multiply -composite
-font Verdana-Bold -pointsize 20 -fill white -stroke black -gravity Center
-annotate 0 "Download" -trim -repage 0x0+7+7
tempbutton.png
and then perform the last clone on the tempbutton, like this:
convert.exe tempbutton.png
( +clone -background navy -shadow 80x4+4+4 ) +swap -background none -flatten
downloadbutton.png
then it works.
How can I avoid to save the image as that last step, and make this one big command?