Crop

You can crop images by entering coordinates for where the boundary of the crop will be.

Note: The maximum accepted image size is 100,000,000 pixels. An image with this many pixels could have width and height combinations like 10,000 x 10,000 or 5,000 x 20,000, etc. There is also a file size restriction. Filestack will not convert an image that is larger than 256mb. Please contact us if you require the ability to process larger files than our current limits.

The input for this parameter must be exactly 4 integers: 'x coordinate,y coordinate,width,height'. For example, an input of crop=dim:[10,20,200,250] selects a 200x250 pixel rectangle starting 10 pixels from the left edge of the image and 20 pixels from the top edge of the image.

How the Cropping Function Works

The X and Y coordinates start from [0,0] and correspond to the top left hand corner of the image to be cropped. The Width and Height parameters dictate the size in pixels of the cropping rectangle once the point to start the crop at is selected by the X and Y coordinates. If you set coordinates that create a crop area that extends outside the frame of the image, then you will only receive back the part of the image that is within the crop area.

Crop Examples

Original Image

Illustration of the crop area created by adding the crop parameters crop=dim:[2000,900,1800,1300].

The crop area starts 2000 pixels in and 900 pixels down which is the top left corner of the rectangle. Then the cropping rectangle is created and is 1800 pixels wide by 1300 pixels tall.

Now we perform the live conversion for the image using crop=dim:[2000,900,1800,1300]:

Result:

Original Image

Illustration of the crop area created by adding the crop parameters crop=dim:[0,0,1000,1300].

The crop area starts 0 pixels in and 0 pixels down (the top left hand corner of the image), while the cropping rectangle is 1000 pixels wide by 1300 pixels tall. A portion of the cropping area exists outside of the image.

Now we perform the live conversion for the image using crop=dim:[0,0,1000,1300]: