Applies a shear to the image M.
The argument M is either a matrix or an RGB image.
axis is the axis along which the shear is to be applied, and can be either ’x’ or ’y’. For example, to shear sideways is to shear along the ’x’ axis. Choosing ’y’ causes an up/down shearing.
alpha is the slope of the shear. For an ’x’ shear, it is the horizontal shift (in pixels) applied to the pixel above the center. For a ’y’ shear, it is the vertical shift (in pixels) applied to the pixel just to the right of the center pixel.
NOTE: alpha does NOT need to be an integer.
bbox can be one of ’loose’, ’crop’ or ’wrap’. ’loose’ allows the image to grow to accommodate the new transformed image. ’crop’ keeps the same size as the original, clipping any part of the image that is moved outside the bounding box. ’wrap’ keeps the same size as the original, but does not clip the part of the image that is outside the bounding box. Instead, it wraps it back into the image.
If called with only 3 arguments, bbox is set to ’loose’ by default.
Package: image