Warp

We can use -warp to shear any ramp into a different orientation:

gmic 256,256,1,1,'x' \
 256,256,1,1,'y' \
 -normalize[-1] -100,100 \
 100%,100% \
 -append[-2,-1] c \
 -warp[-2] [-1],1,2,1 \
 -rm[-1]
 -normalize 0,255

Notice, at the outset, that we have made three images: two ramps and a black image. With the help of -append, we turn the second and third images into a two channel displacement field. We use that to shear the first image, the horizontal ramp.

The parameters to -normalize (3rd line) control the warp. The first parameter -100, shears the top edge 100 pixels to the left and the second parameter, 100, shears the bottom edge to the right, a kind of push-pull (pull-push?). Some people find this approach more intuitive than the trigonometric snippet, though that approach makes the better ramp. Note that the shear has left constant white and black regions at the northeast and southwest corners. These regions increase in size with the magnitude of the shear and should that be a problem, avoid shears.

Input and Fill Blurring