---
title: "Smart Crop"
canonical: "https://docs.pbs.org/space/ITS/4423729/Smart%20Crop"
format: markdown
---
> Macro (toc)

## Overview

<span style="color: #24292e">Smart crop returns an image focused around a user-specified point in the original image of a user-specified size. </span>

## How to use smart crop

<span style="color: #24292e">To use smart crop, the input image </span>*filename*<span style="color: #24292e"> must end in </span>`_focus-XXxYY.ext. Then use `<span style="color: #24292e">the </span>`crop`<span style="color: #24292e"> keyword with two arguments split by x's, as shown in the following example:</span>

##### **Smart crop example**

```
https://image.pbs.org/path/to/file_focus-XXxYY.ext?crop=WWxHH
```

Where:

- XX -- the x axis of the focal point, represented as a percentage value of the height of the original picture
- YY -- the y axis of the focal point, represented as a percentage value of the height of the original picture
- crop -- indicates that ITS should perform a crop
- WW -- a numerical pixel value representing the desired width of the output image
- HH -- a numerical pixel value representing the desired height of the output image

## Live examples

#### Original image: [https://image.pbs.org/test/Sjk2Eqs-asset-mezzanine-16x9-0gsKw4z_focus-90x10.png](https://image.pbs.org/test/Sjk2Eqs-asset-mezzanine-16x9-0gsKw4z_focus-90x10.png)

![image](media://ccc62c8a-e419-4e2f-94bb-d5cf7f141711)

| **Resize by:** | **Example URL** | **Dimensions returned** | **Image result** |
| --- | --- | --- | --- |
| 300 x 400 | https://image.pbs.org/test/Sjk2Eqs-asset-mezzanine-16x9-0gsKw4z_focus-90x10.png?crop=300x400 | 300 x 400 | ![image](media://2c28dcc8-bc4f-4975-be80-fbd44b8029f0) |