Image Transformation Options
Scale
Changes image height and width to given height
and width
values by scaling image. Keeping aspect ratio is not required. No image part is lost. All edges and corners of the original image are still visible on the new image. Takes either or both w and h. If only one parameter is specified, the resized image will adjust the other to keep the width-to-height ratio of the original image.
Fit
When current mode is set to fit with c_fit
, URL scales down the image to fit it into a frame. Takes either or both w
and h
of the frame that image will fit into. If one is given, the other one will be calculated to keep the width-to-height ratio of the original image.
Crop
Removes unwanted outer areas by cutting the edges of the image. Can take x, y, w, h and g. W and h are for defining the cropped image's width and height. If only one parameter is specified, another will be calculated to keep the width-to-height ratio of the original image. X and y are for specifying the beginning coordinates (top left corner) of the cropped image. If only one of x and y is given the other is accepted as 0
. The gravity parameter can be used instead of x and y to specify the position of the cropped image. Gravity parameters can take values like g_top or g_bot_left. If none of the x, y or g parameters are defined, the cropped image will take position at the center of the original image.