-
Notifications
You must be signed in to change notification settings - Fork 4
How to use
h1.Commands
h2.Resize
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 where WIDTH and HEIGHT are both positive numbers.
Scale
Scale an image proportionally by a given percentage
Format
http://urlimg.com/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.
Width
Scale an image proportionaly to the given width
Format
http://urlimg.com/width/SIZE/IMAGEURL
Arguments
SIZE
A positive number specifying the target width of the image.
Height
Scale an image proportionaly to the given height
Format
http://urlimg.com/height/SIZE/IMAGEURL
Arguments
SIZE
A positive number specifying the target height of the image.
Fit
Fit an image proportionally to be within a given size
Format
http://urlimg.com/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 where WIDTH and HEIGHT are both positive numbers.
Thumbnail
Create a thumbnail of an image
Format
http://urlimg.com/thumbnail/SIZE/IMAGEURL
or a shorter version:
http://urlimg.com/thumb/SIZE/IMAGEURL
Arguments
SIZE
A number of pixels or a value of either “small” (64 pixels), “medium” (96 pixels) or “large” (128).
Square
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
http://urlimg.com/square/SIZE/IMAGEURL
Arguments
SIZE
The height and width of the desired square
Rotate
Rotate an image
Format
http://urlimg.com/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.
Crop
Select a rectangular region of an image and remove everything outside of that region.
Format
http://urlimg.com/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.
Watermark
Overlay some text on the image
Format
http://urlimg.com/wm/TEXT/IMAGEURL
or
http://urlimg.com/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.
Black & White
Convert the image to black and white
Format
http://urlimg.com/bw/IMAGEURL
or
http://urlimg.com/blackwhite/IMAGEURL
Invert
Invert the color profile of the image
Format
http://urlimg.com/invert/IMAGEURL
Blur
Apply a blurring filter to the image
Format
http://urlimg.com/blur/IMAGEURL
Sharpen
Apply a sharpening filter to the image
Format
http://urlimg.com/sharpen/IMAGEURL
Convert
Convert the image to a different format
Format
http://urlimg.com/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
Combining Commands
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:
http://urlimg.com/rotate/90/scale/50/crop/25,25,75×75/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.