# Run2 Imagemagick Grayscale

> Convert a batch of images to grayscale in-place using ImageMagick's mogrify command.

- Skill: `cxcscmu/run2-imagemagick-grayscale` (Agent Skill)
- Install (CLI): `npx get-skill add cxcscmu/run2-imagemagick-grayscale`
- Raw SKILL.md: https://api.skillmd.com/api/skills/cxcscmu/run2-imagemagick-grayscale/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: cxcscmu (https://skillmd.com/u/cxcscmu)
- Updated: 2026-11-24
- Page: https://skillmd.com/skills/cxcscmu/run2-imagemagick-grayscale

---

# ImageMagick Grayscale Conversion

Use ImageMagick to edit images in batch on the Linux command-line.

## Usage

To convert images to grayscale in-place, the `mogrify` command is the most efficient choice as it overwrites the original files, avoiding the need to manage new filenames.

```bash
mogrify -colorspace Gray <image_files>
```

**Options Explained:**
- `mogrify`: The ImageMagick tool for in-place batch image manipulation.
- `-colorspace Gray`: Changes the colorspace of the image to grayscale, discarding RGB color information.

### Example

Convert all PNG files in the current directory to grayscale in-place:
```bash
mogrify -colorspace Gray *.png
```

Alternatively, if you want to create new files without modifying the originals, use `convert`:
```bash
convert input.png -colorspace Gray output.png
```

