image-tools
Original:🇺🇸 English
Translated
Image analysis and manipulation. Use when: user wants to analyze images, extract metadata, convert formats, resize, or get image information.
6installs
Added on
NPX Install
npx skill4agent add winsorllc/upgraded-carnival image-toolsTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Image Tools Skill
Image analysis and manipulation tools.
When to Use
- Extract image metadata (EXIF, dimensions, format)
- Convert between image formats
- Resize or crop images
- Analyze image content
- Get image information
Image Information
Get Image Details
bash
# Using file command
file image.jpg
# Using identify (ImageMagick)
identify -verbose image.jpg
# Get dimensions
identify -format "%wx%h" image.jpg
# Get EXIF data
identify -format "%[EXIF:*]" image.jpgQuick Info Script
bash
#!/bin/bash
# Get basic image info
FILE="$1"
if [ -z "$FILE" ]; then
echo "Usage: $0 <image-file>"
exit 1
fi
echo "=== Image Info ==="
file "$FILE"
echo ""
echo "Dimensions:"
identify -format "%wx%h\n" "$FILE"
echo ""
echo "Format:"
identify -format "%m\n" "$FILE"Image Conversion
Convert Formats
bash
# PNG to JPEG
convert input.png output.jpg
# JPEG to PNG
convert input.jpg output.png
# Convert to grayscale
convert input.jpg -colorspace Gray output.jpg
# Resize
convert input.jpg -resize 800x600 output.jpg
convert input.jpg -resize 50% output.jpgWebP Conversion
bash
# JPEG to WebP
cwebp input.jpg -o output.webp
# PNG to WebP
cwebp -lossless input.png -o output.webpImage Analysis
Count Colors
bash
# Unique colors in image
identify -format "%k" input.jpgImage Histogram
bash
# Get color histogram
convert input.jpg -format %c histogram:info:-
# Simple histogram
identify -verbose input.jpg | grep -A 100 "Histogram:"OCR (Text Extraction)
bash
# Extract text from image
tesseract image.jpg stdout
# Specific language
tesseract image.jpg stdout -l engScreenshots
Capture Screen
bash
# Full screen (Linux)
import -window root screenshot.png
# Region selection
import screenshot.png
# Using scrot (if installed)
scrot -s selection.pngCapture URL as Image
bash
# Using wkhtmltoimage
wkhtmltoimage https://example.com page.png
# Using chromium headless
chromium --headless --screenshot=output.png https://example.comUseful Tools
| Tool | Purpose |
|---|---|
| Detect file type |
| Get image metadata |
| Format conversion, resize |
| Blend images |
| Create image grids |
| OCR text extraction |
Examples
Check if image is valid:
bash
file image.jpg && identify image.jpg >/dev/null 2>&1 && echo "Valid image"Batch resize:
bash
for f in *.jpg; do convert "$f" -resize 800x600 "thumb_$f"; doneExtract thumbnail:
bash
convert input.jpg -thumbnail 200x200^ -gravity center -extent 200x200 thumb.jpg