Install
openclaw skills install image-edit-skillExpert Pillow (PIL) skill for image processing, manipulation, and analysis. Use this skill for image editing, batch processing, watermarking, format conversion, and extracting image information. Provides executable scripts and comprehensive reference documentation.
openclaw skills install image-edit-skillEnglish | 简体中文
This skill provides comprehensive image processing capabilities through executable scripts and reference documentation for Pillow (PIL).
Activate this skill when the user requests:
scripts/image_editor.py)Edit single images with various operations:
Usage:
python scripts/image_editor.py input.jpg output.jpg [options]
Options:
--width WIDTH / --height HEIGHT: Resize dimensions--no-aspect: Ignore aspect ratio when resizing--crop X Y WIDTH HEIGHT: Crop rectangle--rotate DEGREES: Rotate image--flip {horizontal,vertical}: Flip image--brightness FACTOR: Adjust brightness (0.0-2.0)--contrast FACTOR: Adjust contrast (0.0-2.0)--color FACTOR: Adjust color saturation (0.0-2.0)--sharpness FACTOR: Adjust sharpness (0.0-2.0)--filter {blur,contour,detail,edge_enhance,emboss,sharpen,smooth}: Apply filter--format FORMAT: Output format (JPEG, PNG, etc.)--quality QUALITY: JPEG quality (1-100)Examples:
# Resize maintaining aspect ratio
python scripts/image_editor.py photo.jpg resized.jpg --width 800
# Multiple operations
python scripts/image_editor.py input.jpg output.jpg \
--crop 100 100 800 600 \
--rotate 90 \
--brightness 1.2 \
--sharpen 1.5
scripts/batch_processor.py)Process multiple images in parallel:
Usage:
python scripts/batch_processor.py input_dir output_dir [options]
Options:
--pattern PATTERN: File pattern (e.g., *.jpg)--resize WIDTH HEIGHT: Resize all images--thumbnail MAX_W MAX_H: Create thumbnails (maintains aspect)--grayscale: Convert to grayscale--brightness FACTOR: Adjust brightness--format FORMAT: Convert format--quality QUALITY: JPEG quality--workers N: Number of parallel workers (default: 4)Examples:
# Create thumbnails
python scripts/batch_processor.py ./photos ./thumbs --thumbnail 300 300
# Batch convert and resize
python scripts/batch_processor.py ./raw ./processed \
--resize 1920 1080 \
--format JPEG \
--quality 90
scripts/watermark.py)Add text or image watermarks:
Usage:
python scripts/watermark.py input.jpg output.jpg --text "TEXT" [options]
python scripts/watermark.py input.jpg output.jpg --image logo.png [options]
Common Options:
--position {top-left,top-right,bottom-left,bottom-right,center}: Position--opacity 0-255: Transparency level--margin PIXELS: Margin from edgeText Options:
--font-size SIZE: Font size--color COLOR: Text color (white/black/red/etc)Image Options:
--scale RATIO: Watermark scale (0.0-1.0)Examples:
# Text watermark
python scripts/watermark.py photo.jpg marked.jpg \
--text "© 2026 Company" \
--position bottom-right \
--opacity 128
# Logo watermark
python scripts/watermark.py image.jpg output.jpg \
--image logo.png \
--scale 0.2 \
--position top-left
scripts/image_info.py)Extract image metadata and properties:
Usage:
python scripts/image_info.py image.jpg [options]
Options:
--format {text,json}: Output format--output FILE: Save to fileProvides:
Example:
# Display info
python scripts/image_info.py photo.jpg
# Save as JSON
python scripts/image_info.py photo.jpg -o info.json --format json
references/common_operations.mdComprehensive Pillow reference covering:
When to use: When Claude needs specific Pillow syntax or operation patterns.
references/best_practices.mdBest practices guide covering:
When to use: When designing image processing workflows or optimizing performance.
image_editor.pybatch_processor.pywatermark.pyimage_info.py# Resize and optimize for web
python scripts/image_editor.py large.jpg web.jpg \
--width 1200 \
--quality 85 \
--format JPEG
# Generate thumbnails
python scripts/batch_processor.py ./originals ./gallery \
--thumbnail 400 400 \
--format JPEG \
--quality 90
# Add company logo
python scripts/watermark.py product.jpg branded.jpg \
--image company_logo.png \
--position bottom-right \
--scale 0.15 \
--opacity 180
# Convert PNG to JPEG
python scripts/batch_processor.py ./pngs ./jpegs \
--format JPEG \
--quality 95
pip install Pillow
Import errors: Ensure Pillow is installed (pip install Pillow)
Font not found: Watermark script falls back to default font
Memory errors: Process large images in smaller batches
Format errors: Check input image format compatibility
RGBA to JPEG: Script automatically handles RGBA→RGB conversion
For detailed operations and troubleshooting, always refer to references/common_operations.md and references/best_practices.md.