We can use -warp to shear any ramp into a different orientation:
gmic 256,256,1,1,'x' \ |
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 |