> For the complete documentation index, see [llms.txt](https://docs.cloudimage.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cloudimage.io/transformations/image-operations/crop/positionable-crop.md).

# Positionable crop

Allows to crop an image by providing the exact cropping area. It is useful when you want to crop a specific part of the image. To set the coordinates of the crop rectangle, use the **tl\_px** and **br\_px** operations or  the `X` and `Y` Parameters are an alternative way to set the coordinates.

<mark style="color:orange;">**tl\_px=X1,Y1**</mark>

<mark style="color:orange;">**br\_px=X2,Y2**</mark>\
\ <mark style="color:orange;">**X=X1**</mark>\ <mark style="color:orange;">**Y=Y1**</mark>

## Examples

Origin image: [/docs/kids.jpg](https://doc.cloudimg.io/https://samples.scaleflex.com/kids.jpg)

<figure><img src="https://fdocs.filerobot.com/docs/kids.jpg" alt=""><figcaption></figcaption></figure>

| Preview                                                             | Syntax                                                                                                                                                                                                                                       |
| ------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ![](/files/cORb1BHYOal8C2uXt9e1)                                    | [/samples.scaleflex.com/kids.jpg?<mark style="color:orange;">**tl\_px=900,100**</mark>&<mark style="color:orange;">**br\_px=1300,550**</mark>](https://doc.cloudimg.io/https://samples.scaleflex.com/kids.jpg?tl_px=900,100\&br_px=1300,550) |
| ![](/files/FACa5vu1wZ6mDfy8S5F1)                                    | [/samples.scaleflex.com/kids.jpg?<mark style="color:orange;">**br\_px=890,560**</mark>](https://doc.cloudimg.io/https://samples.scaleflex.com/kids.jpg?br_px=890,560)                                                                        |
| <img src="/files/twpnuTQ7xrMi4GvtTFdA" alt="" data-size="original"> | [<mark style="color:blue;">**/samples.scaleflex.com/kids.jpg?**</mark><mark style="color:orange;">**x=650\&y=100**</mark>](https://doc.cloudimg.io/https://samples.scaleflex.com/kids.jpg?x=650\&y=100)                                      |

## Combining positionable crop with resize modes

Positionable crop is a separate operation can be combined with all available resize functions - [Width and height](/transformations/image-operations/width-and-height.md), [Crop](/transformations/image-operations/crop.md), [Fit](/transformations/image-operations/fit.md), [Bound](/transformations/image-operations/bound.md) and [Cover](/transformations/image-operations/cover.md). This resize is always performed after the positionable crop.

### Examples

| Preview                          | Syntax                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ![](/files/rq2u5nmePlCARcXT3rl1) | [/samples.scaleflex.com/kids.jpg?<mark style="color:orange;">**w=200**</mark>&<mark style="color:orange;">**tl\_px=900,0**</mark>&<mark style="color:orange;">**br\_px=1300,600**</mark>](https://doc.cloudimg.io/https://samples.scaleflex.com/kids.jpg?w=200\&tl_px=900,0\&br_px=1300,600)                                                                                                                                                                                          |
| ![](/files/VLzo4Sz9aGAXR8Usk90j) | [/samples.scaleflex.com/kids.jpg?<mark style="color:orange;">**w=800**</mark>&<mark style="color:orange;">**h=270**</mark>&<mark style="color:orange;">**tl\_px=310,70**</mark>&<mark style="color:orange;">**br\_px=1550,580**</mark>&<mark style="color:orange;">**func=fit**</mark>&<mark style="color:orange;">**bg\_color=3498db**</mark>](https://doc.cloudimg.io/https://samples.scaleflex.com/kids.jpg?w=800\&h=270\&tl_px=310,70\&br_px=1550,580\&func=fit\&bg_color=3498db) |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.cloudimage.io/transformations/image-operations/crop/positionable-crop.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
