-
Notifications
You must be signed in to change notification settings - Fork 4
How to use
Resize an image.
Format:
/resize/WIDTHxHEIGHT/IMAGEURL
Arguments
-
WIDTHxHEIGHT
- The width and height of the desired image. Expressed as a width and height specification of the form
WIDTHxHEIGHT
whereWIDTH
andHEIGHT
are both positive numbers.
- The width and height of the desired image. Expressed as a width and height specification of the form
Scale an image proportionally by a given percentage
Format
/scale/PERCENT/IMAGEURL
Arguments
PERCENT
- A value between 0 and 1000 by which to scale the image. If greater than 100, the image will be increased in size by that percentage amount.
Scale an image proportionaly to the given width
Format
/width/SIZE/IMAGEURL
Arguments
-
SIZE
- A positive number specifying the target width of the image.
Scale an image proportionaly to the given height
Format
/height/SIZE/IMAGEURL
Arguments
-
SIZE
- A positive number specifying the target height of the image.
Fit an image proportionally to be within a given size
Format
/fit/WIDTHxHEIGHT/IMAGEURL
Arguments
-
WIDTHxHEIGHT
- The box that the image must be resized to fit into. Expressed as a width and height specification of the form
WIDTHxHEIGHT
whereWIDTH
andHEIGHT
are both positive numbers.
- The box that the image must be resized to fit into. Expressed as a width and height specification of the form
Create a thumbnail of an image
Format
/thumbnail/SIZE/IMAGEURL
or a shorter version:
/thumb/SIZE/IMAGEURL
Arguments
-
SIZE
- A number of pixels or a value of either “small” (64 pixels), “medium” (96 pixels) or “large” (128).
Create a squared version of an image. This will resize and crop an image to create a squared version with the height and width given.
Format
/square/SIZE/IMAGEURL
Arguments
-
SIZE
- The height and width of the desired square
Rotate an image
Format
/rotate/DEGREES/IMAGEURL
Arguments
DEGREES
- A value specifying the number of degrees that the image is to be rotated in a clockwise direction. A negative number will rotate the image in a counter-clockwise direction.
Select a rectangular region of an image and remove everything outside of that region.
Format
/crop/CORNER-X,CORNER-Y,WIDTHxHEIGHT/IMAGEURL
Arguments
-
CORNER-X
- The x coordinate of the bottom left corner of the rectangle to be cropped.
-
CORNER-Y
- The y coordinate of the bottom left corner of the rectangle to be cropped.
-
WIDTH
- The width of the rectangle to be cropped.
-
HEIGHT
- The height of the rectangle to be cropped.
Overlay some text on the image
Format
/wm/TEXT/IMAGEURL
or
/watermark/TEXT/IMAGEURL
Arguments
-
TEXT
- The text of the watermark.
Note:
It is recommended that after generating the watermarked image, you remove the original image. Otherwise it will continue to be publicly available.
- The text of the watermark.
Convert the image to black and white
Format
/bw/IMAGEURL
or
/blackwhite/IMAGEURL
Invert the color profile of the image
Format
/invert/IMAGEURL
Apply a blurring filter to the image
Format
/blur/IMAGEURL
Apply a sharpening filter to the image
Format
/sharpen/IMAGEURL
Convert the image to a different format
Format
/convert/FORMAT/IMAGEURL
Arguments
-
FORMAT
- The desired image format of the created image. Allowable values are: bmp, gif, im, jpeg/jpg, msp, pcx, pdf, png, ppm, tiff, xbm
Commands can also be combined together. For example, you could rotate an image 90 degrees, resize it and then crop it. A command to do this would look like:
/rotate/90/scale/50/crop/25,25,75x75/example.com/myimage.jpg
There are no limits to how many commands you can combine, besides the limit of a web browsers address length. The commands will be performed in order of left to right.