Code: Select all
convert source.jpg -resize 88x88 -background #eeeeee -gravity center -extent 100x100 destination.jpg
How can this be done?
Code: Select all
convert source.jpg -resize 88x88 -background #eeeeee -gravity center -extent 100x100 destination.jpg
Code: Select all
%IMG7%magick ^
rose: ^
( +clone -background navy -shadow 80x3+5+5 ) ^
+swap ^
-background none -layers merge +repage ^
-background #eee ^
-layers flatten ^
-gravity Center -extent 100x100 ^
shadow.png
When I run the first example at the "Generating Shadows" tutorial you hyperlinked (http://www.imagemagick.org/Usage/blur/#shadow):ImageMagick 7.0.8-47 Q8 x64 2019-05-27
Code: Select all
convert rose: ( +clone -background navy -shadow 80x3+5+5 ) +swap -background none -layers merge +repage shadow.png
...and the rose conversion above completes successfully.Version: ImageMagick 7.0.8-66 Q16 x64 2019-09-22
Code: Select all
convert rose: -resize 88x88 ( +clone -background #000 -shadow 63x3+5+5 ) +swap -background none -layers merge +repage -background #c2c5cc -layers flatten -gravity center -extent 100x100 output.jpg
Code: Select all
-gravity center
Code: Select all
convert rose: -resize 88x88 ^
( +clone -background black -shadow 63x3+5+5 ) ^
+swap -background none -layers merge +repage ^
-background "#c2c5cc" -layers flatten -format "%wx%h" +write info: ^
-shave 1x1 -bordercolor green1 -border 1 ^
-gravity center -extent 100x100 output.jpg
Code: Select all
convert rose: -resize 88x88 ( +clone -background #000 -shadow 63x3+2+2 ) +swap ( +clone -background #000 -shadow 0x3-2-2 ) +swap -background none -layers merge +repage -background #c2c5cc -layers flatten -gravity center -extent 100x100 output.jpg
Code: Select all
convert rose: -resize 88x88 ^
( +clone -background black -shadow 63x3+5+5 ) ^
+swap -background none -layers merge +repage ^
-background "#c2c5cc" -layers flatten +repage ^
( -size 100x100 xc:"#c2c5cc" ) ^
+swap -geometry +6+21 -compose over -composite ^
result.png