Code: Select all
magick logo: -alpha on -resize 50% -background none -shear -36x0 sheartest1.png
The "-shear" operator extends the canvas and fills the added space with the background color, but... Sometimes I'd like to have that background filled according to the virtual-pixel setting instead. So I've been experimenting with "+distort affineprojection" to create a shear, slanted at a specified angle, and getting its background from virtual-pixel.
Working from an example at THIS link, I've tried to get that same 36 degree slant using a command like this...
Code: Select all
magick logo: -alpha on -resize 50% -background none -virtual-pixel none ^
+distort affineprojection "1,0,%[fx:sin(36*pi/180)],1,0,0" -shave 1x1 sheartest2.png
Maybe I misunderstand what the example page means by using an angle to calculate the amount of shear, but it really seemed like those two above commands should create nearly the same result. Am I missing something obvious here?