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):
Code: Select all
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
The problem is the last clone step:
Code: Select all
( +clone -background navy -shadow 80x4+4+4 ) +swap -background none -flatten
Furthermore. IF I save the image before the last step, like this:
Code: Select all
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
Code: Select all
convert.exe tempbutton.png
( +clone -background navy -shadow 80x4+4+4 ) +swap -background none -flatten
downloadbutton.png
How can I avoid to save the image as that last step, and make this one big command?