I

image-manipulation-image-magick

Verified

by github · Updated Apr 16, 2026

opus
23in5.8Kout
$0.532m 35s

Process and manipulate images using ImageMagick. Supports resizing, format conversion, batch processing, and retrieving image metadata. Use when working with images, creating thumbnails, resizing wallpapers, or performing batch image operations.

image-processingimagemagickresizeconversionthumbnailsbatch-processing

See It In Action

1 turns·claude
The project codebase is in your current working directory. Explore the files to understand the code before making changes. need the partner logos in /assets/partners cleaned up before the 4pm handoff — check them all, give me a size report, make consistent transparent versions, and thumbs for the really tall ones

I'll start by exploring the project structure and the partner logos directory.

Found 6 partner logos in mixed formats. Let me get detailed metadata on all of them and set up the task list.

Good, I have a full picture now. Let me set up the task list and get to work.

Here's the Size Report for all partner logos:

FileFormatDimensionsAspectAlphaFile SizeIssues
acme-corp.pngPNG800x4002:1Yes10.1 KBOK
globex-inc.pngPNG1200x12001:1No1.3 KBNo transparency, very tall
initech-logo.jpgJPEG320x4802:3No7.7 KBJPEG (no transparency possible), portrait/tall
umbrella-co.pngPNG500x806.25:1No1.4 KBNo transparency
wayne enterprises.pngPNG600x3002:1Yes9.8 KBSpace in filename
stark-ind.svgSVG450x220~2:1Yes256 BVector format, not PNG

Key findings:

  • 3 logos lack transparency (globex-inc, initech-logo, umbrella-co)
  • 1 is JPEG (can't have transparency natively) — initech-logo.jpg
  • 1 is SVG (vector) — stark-ind.svg
  • 2 are notably tall: globex-inc.png (1200px) and initech-logo.jpg (480px)
  • wayne enterprises.png has a space in the filename

Now let me look at the actual images to identify background colors for transparency conversion.

Now I can see all the logos. Each has a solid color background that needs to be made transparent. Let me get the exact background colors and process everything.

Got the exact background colors. Now let me create all the transparent PNGs in one batch.

Now let me verify the transparent versions look correct.

All 6 transparent versions look clean — backgrounds removed, shapes preserved. Now let me create thumbnails for the tall ones.

The two tall logos are:

  • globex-inc.png — 1200x1200 (tallest overall)
  • initech-logo.png — 320x480 (portrait, taller than wide)

I'll create thumbnails from the transparent versions, capping height at 240px while maintaining aspect ratio.

Thumbnails look good. Let me mark everything complete.

All done. Here's the summary:


Original Logos — Size Report

LogoFormatDimensionsHas AlphaIssues
acme-corp.pngPNG800x400YesSolid blue bg despite alpha channel
globex-inc.pngPNG1200x1200NoVery tall, no transparency
initech-logo.jpgJPEG320x480NoJPEG format, portrait/tall
umbrella-co.pngPNG500x80NoNo transparency
wayne enterprises.pngPNG600x300YesSpace in filename, solid orange bg
stark-ind.svgSVG450x220YesVector format, dark bg fill

What was generated

assets/partners/transparent/ — 6 consistent transparent PNGs:

  • All backgrounds removed, logo shapes preserved
  • JPG converted to PNG, SVG rasterized to PNG
  • Filename space fixed (wayne-enterprises.png)

assets/partners/thumbs/ — Thumbnails for the two tall logos (height capped at 240px):

  • globex-inc-thumb.png — 240x240 (down from 1200x1200)
  • initech-logo-thumb.png — 160x240 (down from 320x480)
Claude Sonnet 4.6

External Tools

ToolType
magickbinary

Permissions

ScopeDescription
filesystem:read
filesystem:write
process:spawn

SKILL.md

Image Manipulation with ImageMagick

This skill enables image processing and manipulation tasks using ImageMagick across Windows, Linux, and macOS systems.

When to Use This Skill

Use this skill when you need to:

  • Resize images (single or batch)
  • Get image dimensions and metadata
  • Convert between image formats
  • Create thumbnails
  • Process wallpapers for different screen sizes
  • Batch process multiple images with specific criteria

Prerequisites

  • ImageMagick installed on the system
  • Windows: PowerShell with ImageMagick available as magick (or at C:\Program Files\ImageMagick-*\magick.exe)
  • Linux/macOS: Bash with ImageMagick installed via package manager (apt, brew, etc.)

Core Capabilities

1. Image Information

  • Get image dimensions (width x height)
  • Retrieve detailed metadata (format, color space, etc.)
  • Identify image format

2. Image Resizing

  • Resize single images
  • Batch resize multiple images
  • Create thumbnails with specific dimensions
  • Maintain aspect ratios

3. Batch Processing

  • Process images based on dimensions
  • Filter and process specific file types
  • Apply transformations to multiple files

Usage Examples

Example 0: Resolve magick executable

PowerShell (Windows):

# Prefer ImageMagick on PATH
$magick = (Get-Command magick -ErrorAction SilentlyContinue)?.Source

# Fallback: common install pattern under Program Files
if (-not $magick) {
    $magick = Get-ChildItem "C:\\Program Files\\ImageMagick-*\\magick.exe" -ErrorAction SilentlyContinue |
        Select-Object -First 1 -ExpandProperty FullName
}

if (-not $magick) {
    throw "ImageMagick not found. Install it and/or add 'magick' to PATH."
}

Bash (Linux/macOS):

# Check if magick is available on PATH
if ! command -v magick &> /dev/null; then
    echo "ImageMagick not found. Install it using your package manager:"
    echo "  Ubuntu/Debian: sudo apt install imagemagick"
    echo "  macOS: brew install imagemagick"
    exit 1
fi

Example 1: Get Image Dimensions

PowerShell (Windows):

# For a single image
& $magick identify -format "%wx%h" path/to/image.jpg

# For multiple images
Get-ChildItem "path/to/images/*" | ForEach-Object { 
    $dimensions = & $magick identify -format "%f: %wx%h`n" $_.FullName
    Write-Host $dimensions 
}

Bash (Linux/macOS):

# For a single image
magick identify -format "%wx%h" path/to/image.jpg

# For multiple images
for img in path/to/images/*; do
    magick identify -format "%f: %wx%h\n" "$img"
done

Example 2: Resize Images

PowerShell (Windows):

# Resize a single image
& $magick input.jpg -resize 427x240 output.jpg

# Batch resize images
Get-ChildItem "path/to/images/*" | ForEach-Object { 
    & $magick $_.FullName -resize 427x240 "path/to/output/thumb_$($_.Name)"
}

Bash (Linux/macOS):

# Resize a single image
magick input.jpg -resize 427x240 output.jpg

# Batch resize images
for img in path/to/images/*; do
    filename=$(basename "$img")
    magick "$img" -resize 427x240 "path/to/output/thumb_$filename"
done

Example 3: Get Detailed Image Information

PowerShell (Windows):

# Get verbose information about an image
& $magick identify -verbose path/to/image.jpg

Bash (Linux/macOS):

# Get verbose information about an image
magick identify -verbose path/to/image.jpg

Example 4: Process Images Based on Dimensions

PowerShell (Windows):

Get-ChildItem "path/to/images/*" | ForEach-Object { 
    $dimensions = & $magick identify -format "%w,%h" $_.FullName
    if ($dimensions) {
        $width,$height = $dimensions -split ','
        if ([int]$width -eq 2560 -or [int]$height -eq 1440) {
            Write-Host "Processing $($_.Name)"
            & $magick $_.FullName -resize 427x240 "path/to/output/thumb_$($_.Name)"
        }
    }
}

Bash (Linux/macOS):

for img in path/to/images/*; do
    dimensions=$(magick identify -format "%w,%h" "$img")
    if [[ -n "$dimensions" ]]; then
        width=$(echo "$dimensions" | cut -d',' -f1)
        height=$(echo "$dimensions" | cut -d',' -f2)
        if [[ "$width" -eq 2560 || "$height" -eq 1440 ]]; then
            filename=$(basename "$img")
            echo "Processing $filename"
            magick "$img" -resize 427x240 "path/to/output/thumb_$filename"
        fi
    fi
done

Guidelines

  1. Always quote file paths - Use quotes around file paths that might contain spaces
  2. Use the & operator (PowerShell) - Invoke the magick executable using & in PowerShell
  3. Store the path in a variable (PowerShell) - Assign the ImageMagick path to $magick for cleaner code
  4. Wrap in loops - When processing multiple files, use ForEach-Object (PowerShell) or for loops (Bash)
  5. Verify dimensions first - Check image dimensions before processing to avoid unnecessary operations
  6. Use appropriate resize flags - Consider using ! to force exact dimensions or ^ for minimum dimensions

Common Patterns

PowerShell Patterns

Pattern: Store ImageMagick Path

$magick = (Get-Command magick).Source

Pattern: Get Dimensions as Variables

$dimensions = & $magick identify -format "%w,%h" $_.FullName
$width,$height = $dimensions -split ','

Pattern: Conditional Processing

if ([int]$width -gt 1920) {
    & $magick $_.FullName -resize 1920x1080 $outputPath
}

Pattern: Create Thumbnails

& $magick $_.FullName -resize 427x240 "thumbnails/thumb_$($_.Name)"

Bash Patterns

Pattern: Check ImageMagick Installation

command -v magick &> /dev/null || { echo "ImageMagick required"; exit 1; }

Pattern: Get Dimensions as Variables

dimensions=$(magick identify -format "%w,%h" "$img")
width=$(echo "$dimensions" | cut -d',' -f1)
height=$(echo "$dimensions" | cut -d',' -f2)

Pattern: Conditional Processing

if [[ "$width" -gt 1920 ]]; then
    magick "$img" -resize 1920x1080 "$outputPath"
fi

Pattern: Create Thumbnails

filename=$(basename "$img")
magick "$img" -resize 427x240 "thumbnails/thumb_$filename"

Limitations

  • Large batch operations may be memory-intensive
  • Some complex operations may require additional ImageMagick delegates
  • On older Linux systems, use convert instead of magick (ImageMagick 6.x vs 7.x)

FAQ

What does image-manipulation-image-magick do?

Process and manipulate images using ImageMagick. Supports resizing, format conversion, batch processing, and retrieving image metadata. Use when working with images, creating thumbnails, resizing wallpapers, or performing batch image operations.

When should I use image-manipulation-image-magick?

Use it when you need a repeatable workflow that produces image output.

What does image-manipulation-image-magick output?

In the evaluated run it produced image output.

How do I install or invoke image-manipulation-image-magick?

Ask the agent to use this skill when the task matches its documented workflow.

Which agents does image-manipulation-image-magick support?

Agent support is inferred from the source, but not explicitly declared.

What tools, channels, or permissions does image-manipulation-image-magick need?

It uses magick; channels commonly include image; permissions include filesystem:read, filesystem:write, process:spawn.

Is image-manipulation-image-magick safe to install?

Static analysis marked this skill as medium risk; review side effects and permissions before enabling it.

How is image-manipulation-image-magick different from an MCP or plugin?

A skill packages instructions and workflow conventions; tools, MCP servers, and plugins are dependencies the skill may call during execution.

Does image-manipulation-image-magick outperform not using a skill?

About image-manipulation-image-magick

When to use image-manipulation-image-magick

When you need to resize or convert one or many local images. When you want to generate thumbnails or wallpaper variants from existing image files. When you need to inspect image dimensions or metadata before processing.

When image-manipulation-image-magick is not the right choice

When ImageMagick is not installed or cannot be invoked as a local CLI. When the task requires cloud-hosted image management or external media APIs rather than local file processing.

What it produces

Produces image output.