IMA: Image Manipulation

Alter web images with simple URL routes. All you need to do is specify the source image.

Try it out

/
/
/ /
/
?src=

Resize

Use this route to resize an image:

/resize/<width>x<height>

Where width and height are the pixel dimensions you wish to resize an image to. You also have the option to specify a few dimension aliases like 'thumbnail' and 'default':

/resize/thumbnail Dimensions: 80x

/resize/default Dimensions: 640x

Finally if you want to uniformly scale an image based only on width or height you can optionally leave one dimension blank:

/resize/<width>x

/resize/x<height>

Default Value If no dimensions are specified then the 'default' dimension alias is used.

Rotate

Use this route to rotate an image:

/rotate/<degrees>

Where degrees are specified as the amount of rotation for the image. Note that you can also specify negative degrees.

Default Value If no rotation is specified then the default value is '-90'

Crop

Use this route to crop an image:

/crop/<x>,<y>/<x>,<y>

Where the first set of points define the top right corner of the area that will be cropped. The second optional set of points represent the bottom left point of the cropped area. If The second point isn't set then the bottom left corner is considered the bottom left corner of the image.

Default Value If no points are specified then the image will not be cropped.

Filter

Warning Filters don't currently work with animated GIFs

Use this route to add a filter to an image:

/filter/<type>/<extra params>

Where the type is the type of filter to apply. Currently the filter types are:

  • Blur Extra Params: <radius>,<sigma>
  • Charcoal Extra Params: <radius>,<sigma>
  • Emboss Extra Params: <radius>,<sigma>
  • Negate No Extra Params
  • Sharpen Extra Params: <radius>,<sigma>

Default Value If extra parameters are required but not set the default is 0,1.