Labsco
github logo

image-manipulation-image-magick

✓ Official36,200

by github · part of github/awesome-copilot

Image processing and manipulation using ImageMagick across Windows, Linux, and macOS. Retrieve image metadata, dimensions, and format information with the identify command Resize single or batch images with aspect ratio control and thumbnail generation Filter and process images based on dimensions or file type criteria Requires ImageMagick installed and available as magick on PATH; includes platform-specific setup for PowerShell (Windows) and Bash (Linux/macOS)

🔥🔥🔥✓ VerifiedFreeNeeds API keys
🧩 One of 7 skills in the github/awesome-copilot package — works on its own, and pairs well with its siblings.

Image processing and manipulation using ImageMagick across Windows, Linux, and macOS. Retrieve image metadata, dimensions, and format information with the identify command Resize single or batch images with aspect ratio control and thumbnail generation Filter and process images based on dimensions or file type criteria Requires ImageMagick installed and available as magick on PATH; includes platform-specific setup for PowerShell (Windows) and Bash (Linux/macOS)

Inspect the full instructions your agent will receiveExpand

This is the exact playbook injected into your agent when the skill activates — shown here so you can audit it before installing. You don't need to read it to use the skill.

by github

Image processing and manipulation using ImageMagick across Windows, Linux, and macOS. Retrieve image metadata, dimensions, and format information with the identify command Resize single or batch images with aspect ratio control and thumbnail generation Filter and process images based on dimensions or file type criteria Requires ImageMagick installed and available as magick on PATH; includes platform-specific setup for PowerShell (Windows) and Bash (Linux/macOS) npx skills add https://github.com/github/awesome-copilot --skill image-manipulation-image-magick Download ZIPGitHub36.2k

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

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

Guidelines

  • Always quote file paths - Use quotes around file paths that might contain spaces

  • Use the & operator (PowerShell) - Invoke the magick executable using & in PowerShell

  • Store the path in a variable (PowerShell) - Assign the ImageMagick path to $magick for cleaner code

  • Wrap in loops - When processing multiple files, use ForEach-Object (PowerShell) or for loops (Bash)

  • Verify dimensions first - Check image dimensions before processing to avoid unnecessary operations

  • Use appropriate resize flags - Consider using ! to force exact dimensions or ^ for minimum dimensions

Common Patterns

PowerShell Patterns

Pattern: Store ImageMagick Path

Copy & paste — that's it
$magick = (Get-Command magick).Source

Pattern: Get Dimensions as Variables

Copy & paste — that's it
$dimensions = & $magick identify -format "%w,%h" $_.FullName
$width,$height = $dimensions -split ','

Pattern: Conditional Processing

Copy & paste — that's it
if ([int]$width -gt 1920) {
 & $magick $_.FullName -resize 1920x1080 $outputPath
}

Pattern: Create Thumbnails

Copy & paste — that's it
& $magick $_.FullName -resize 427x240 "thumbnails/thumb_$($_.Name)"

Bash Patterns

Pattern: Check ImageMagick Installation

Copy & paste — that's it
command -v magick &> /dev/null || { echo "ImageMagick required"; exit 1; }

Pattern: Get Dimensions as Variables

Copy & paste — that's it
dimensions=$(magick identify -format "%w,%h" "$img")
width=$(echo "$dimensions" | cut -d',' -f1)
height=$(echo "$dimensions" | cut -d',' -f2)

Pattern: Conditional Processing

Copy & paste — that's it
if [[ "$width" -gt 1920 ]]; then
 magick "$img" -resize 1920x1080 "$outputPath"
fi

Pattern: Create Thumbnails

Copy & paste — that's it
filename=$(basename "$img")
magick "$img" -resize 427x240 "thumbnails/thumb_$filename"