Source Rectangle Region
By default, the entire image is used as the area for processing. The
rect parameter selects a sub-region of the source image to use for processing before applying other resize operations.
The value for
rect is four integers or relative values representing the starting coordinates of
y and the
height, all separated by commas.
x can take either an integer, float, or
left is equivalent to
center is equivalent to half of the difference of the image width minus the
rect width, and
right is the difference between the image width minus the
y can take either an integer, float, or
top is equivalent to
middle is equivalent to the half the difference of the image height minus the
rect height, and
bottom is equivalent to the difference of the image height minus the
See the API specification for more information about this parameter's value ranges and format.