fill

Adapts the size of the image to completely fill a box, parts of the image can therefore be hidden, but proportionality is respected.

parameters

  • target size: size (dimension values) of the new image (width and height). Default is size of the image.

  • gravity: gravity value, location of the image (center by default)

  • location: coordinates (x and y) of the center of the source image in the target image

JSON object properties

  • width: width of the new image

  • height: height of the new image

  • gravity: gravity

  • x: the x (easting) of the center point of the source image in the target image

  • y: the y (northing) of the center point of the source image in the target image

simplified syntax parameters

  • prefix w: the width of the target image

  • prefix h: the height of the target image

  • prefix g: the gravity

  • prefix x: the x (easting) of the center point of the source image in the target image

  • prefix y: the y (northing) of the center point of the source image in the target image

array type parameters

The possible arrays are:

  • [width, height]

  • [gravity, width, height]

  • [x, y, width, height]

  • [gravity, x, y, width, height]

Example 1 - Fill, no gravity

{ "fill":[300,300] }

Maldives: W400×H225

Maldives: W300×H300

Simplified syntax: w_300,h_300,c_fill

Example 2 - Fill, with gravity

{ "fill":["east",300,300] }

Maldives: W400×H225

Maldives: W300×H300

Simplified syntax: g_east,w_300,h_300,c_fill

Â