<commit_before>---
---

## Usage

Get image information:

```shell
magick identify image.png
```

### Convert

Manipulate images.
Optionally convert to another formats (ex: to JPG or PDF).

```shell
convert INPUT_OPTIONS INPUT_FILE OUTPUT_OPTIONS OUTPUT_FILE
```

| Option | Description |
| --- | --- |
| `-strip` | Strip image of all profiles and comments. |
| `-resize` | Resize to `WxH`. If width or height is not specified, ratio is kept. |
| `-quality` | Valid only for JPEG or MPEG. 100 is lossless, 1 is worst quality. |
| `-interlace` | Type of image interlacing scheme. `none`, `line`, `plane`, `JPEG`, `GIF`, `PNG`. |
| `-gaussian-blur` | Reduce image noise and reduce detail levels. |
| `-sampling-factor` | Used by the JPEG encoder for chroma downsampling. |

Example of image size reduction:

```shell
convert bigimage.png -strip -resize x180 -quality 85 -interlace plane -gaussian-blur 0.05 -sampling-factor 4:2:0 smallimage.jpg
```

Convert images to PDF:

```shell
convert page*.png mydoc.pdf
```<commit_msg>Add note for cropping images with imagemagick<commit_after>---
---

## Usage

Get image information:

```shell
magick identify image.png
```

### Convert

Manipulate images.
Optionally convert to another formats (ex: to JPG or PDF).

```shell
convert INPUT_OPTIONS INPUT_FILE OUTPUT_OPTIONS OUTPUT_FILE
```

| Option | Description |
| --- | --- |
| `-strip` | Strip image of all profiles and comments. |
| `-resize` | Resize to WxH. If width or height is not specified, ratio is kept. |
| `-crop WxH+X+Y` | Crop the image to size WxH, starting from (X;Y). |
| `-quality` | Valid only for JPEG or MPEG. 100 is lossless, 1 is worst quality. |
| `-interlace` | Type of image interlacing scheme. `none`, `line`, `plane`, `JPEG`, `GIF`, `PNG`. |
| `-gaussian-blur` | Reduce image noise and reduce detail levels. |
| `-sampling-factor` | Used by the JPEG encoder for chroma downsampling. |

Example of image size reduction:

```shell
convert bigimage.png -strip -resize x180 -quality 85 -interlace plane -gaussian-blur 0.05 -sampling-factor 4:2:0 smallimage.jpg
```

Convert images to PDF:

```shell
convert page*.png mydoc.pdf
```
{'fraction_non_alphanumeric': 0.1382038157282457, 'fraction_numerical': 0.013959981386691484, 'mean_word_length': 3.831460674157303, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7378034', 'n_tokens_mistral': 751, 'n_tokens_neox': 696, 'n_words': 263}