image-manipulation-image-magick

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.

By github · 9,660 installs

npx skills add github/awesome-copilot --skill image-manipulation-image-magick

Source repository · Upstream listing

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): Bash (Linux/macOS): Example 1: Get Image Dimensions PowerShell (Windows): Bash (Linux/macOS): Example 2: Resize Images PowerShell (Windows): Bash (Linux/macOS): Example 3: Get Detailed Image Information PowerShell (Windows): Bash (Linux/macOS): Example 4: Process Images Based on Dimensions PowerShell (Windows): Bash (Linux/macOS): 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 Pattern: Get Dimensions as Variables Pattern: Conditional Processing Pattern: Create Thumbnails Bash Patterns Pattern: Check ImageMagick Installation Pattern: Get Dimensions as Variables Pattern: Conditional Processing Pattern: Create Thumbnails 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)