resize

Resize the image.

parameters

  • width: dimension value, the new width of the final image. Default is the width of the original image.

  • height: dimension value, the new height of the final image. Default is the height of the original image.

use the value width for height and height for width to inverse them.

JSON object properties

  • width: the new width of the final image

  • height: the new height of the final image

simplified syntax parameters

  • prefix w: the new width of the final image

  • prefix h: the new height of the final image

array type parameters

  • [width & height] (the only element is both width and height)

  • [width, height] (first width, then height)

string or number type parameters

  • the width and the height, or

    • if the value is width, sets the width value to the height

    • if the value is height, sets the height value to the width

Example 1 - Not proportional resizing

{ "resize":["125%","75%"] }

Maldives: W400×H225

Maldives: W500×H168

Simplified syntax: w_125p,h_75p,c_resize

Example 2 - One dimension resizing

{ "resize":{"height":"200%"} }

Maldives: W400×H225

Maldives: W400×H450

Simplified syntax: h_200p,c_resize

Example 3 - Proportional resizing

{ "resize":["proportional","50%"] }

Maldives: W400×H225

Maldives: W199×H112

Simplified syntax: w_proportional,h_50p,c_resize

Example 4 - Square

 

Maldives: W400×H225

Maldives: W225×H225

Simplified syntax: w_height,c_resize

Example 5 - Invert width and height

Maldives: W400×H225

Maldives: W225×H400

Simplified syntax: w_height,h_width,c_resize