mcpField
G
gimp-inkscape

gimp-inkscape

github.com/ramon-webdevpro-nlCreative & media11156 installsUpdated 26w ago
Repository

About gimp-inkscape

A local image creation and editing skill for people who need practical workflows across command-line and graphics tools. It maps common tasks to ImageMagick, GIMP, Inkscape, and related utilities, with command examples for conversion, editing, and optimization.

Key features

  1. 01Choose tools by image task
  2. 02Convert and batch-resize images
  3. 03Edit layers and adjust color
  4. 04Export SVG, PDF, and animations
  5. 05Compress files and manage metadata

Use cases

  1. 01Batch-resize images in a folder
  2. 02Export SVGs or PDF pages as images
  3. 03Add text, layers, or watermarks to images
  4. 04Optimize images and strip metadata before publishing

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/ramon-webdevpro-nl/claude-skills --skill gimp-inkscape

After installing, type/gimp-inkscapein Claude Code to confirm it loaded.

Details

From the project README

GIMP + Inkscape + ImageMagick Image Skill

Local image creation and manipulation. No API calls, no cost, no internet required.

Decision Guide — Pick the Right Tool

TaskUseNotes
Simple resizeImageMagick10× faster than GIMP, one liner
Batch resize folderImageMagick mogrifyPurpose-built for batch
SVG → PNGInkscapeVector quality, exact dimensions
Text overlay / watermarkImageMagickReliable; GIMP Script-Fu text is flaky
Complex typographyInkscape SVGPixel-perfect vector text
Format conversionImageMagickOne liner, handles WebP too
Compositing / layersGIMPFull layer control
Color correctionGIMPCurves/levels more precise than IM
PNG compressionOptiPNGLossless, 20–50% savings
JPEG compressionjpegoptimLossless recompression
Metadata read/stripExifToolThe industry standard
GIF / animationFFmpegNothing else handles this
PDF → imagepdftoppmClean, DPI-controllable
Photo editing (advanced)GIMPHealing, clone stamp, curves
Optional installs for two specific tasks
  • Background removal: pip install rembg then rembg i input.png output.png
  • AI upscaling: Real-ESRGAN — significant quality boost over interpolation upscaling

ImageMagick — CLI Reference

Format conversion
convert input.png output.jpg
convert input.jpg output.webp
convert input.png -quality 92 output.jpg
Resize
# Exact dimensions (may distort)
convert input.jpg -resize 1200x630! output.jpg

# Fit within box (preserves aspect ratio)
convert input.jpg -resize 1200x630 output.jpg

# Fill and crop to exact dimensions (centered)
convert input.jpg -resize 1200x630^ -gravity Center -extent 1200x630 output.jpg
Batch resize entire folder (mogrify)
# Resize all JPEGs in place
mogrify -resize 800x600 /path/to/folder/*.jpg

# Resize and output to a different folder
mogrify -resize 800x600 -path /output/folder /input/folder/*.jpg

# Convert all PNGs to WebP
mogrify -format webp /path/to/folder/*.png
Text overlay / watermark
# Simple text in bottom-right corner
convert input.jpg \
  -font DejaVu-Sans -pointsize 36 \
  -fill white -annotate +20+40 "© ReshareAI" \
  output.jpg

# Centered text with shadow
convert input.jpg \
  -font DejaVu-Sans-Bold -pointsize 72 \
  -fill black -annotate +202+302 "Headline" \
  -fill white -annotate +200+300 "Headline" \
  output.jpg

# Semi-transparent watermark tiled across image
convert input.jpg \
  -font DejaVu-Sans -pointsize 48 -fill "rgba(255,255,255,0.3)" \
  -gravity Center -annotate 30x30+0+0 "WATERMARK" \
  output.jpg
Composite: place logo/image on top
# Place logo.png bottom-right with 10px padding
convert base.jpg \
  logo.png \
  -gravity SouthEast -geometry +10+10 \
  -composite output.jpg

# Place with opacity
convert base.jpg \
  \( logo.png -alpha set -channel Alpha -evaluate multiply 0.5 \) \
  -gravity Center -composite output.jpg
Color adjustments
# Brightness / contrast
convert input.jpg -brightness-contrast 10x20 output.jpg

# Saturation
convert input.jpg -modulate 100,130,100 output.jpg

# Grayscale
convert input.jpg -colorspace Gray output.jpg

# Sharpen
convert input.jpg -unsharp 0x1 output.jpg
Get image info
identify input.jpg
identify -verbose input.jpg | grep -E "Geometry|Colorspace|Format|filesize"

ImageMagick — WebP

ImageMagick has the WebP delegate built in (confirmed on this system):

# PNG/JPEG → WebP
convert input.png -quality 85 output.webp

# WebP → PNG
convert input.webp output.png

# Batch convert all JPEGs to WebP
mogrify -format webp -quality 85 /path/to/folder/*.jpg

FFmpeg — GIF & Animation

Video → GIF
# Basic
ffmpeg -i input.mp4 -vf "fps=10,scale=800:-1" output.gif

# High quality (uses palette)
ffmpeg -i input.mp4 -vf "fps=12,scale=800:-1:flags=lanczos,palettegen" palette.png
ffmpeg -i input.mp4 -i palette.png -vf "fps=12,scale=800:-1:flags=lanczos,paletteuse" output.gif

# Clip a section (start 5s, duration 3s)
ffmpeg -ss 5 -t 3 -i input.mp4 -vf "fps=10,scale=600:-1" output.gif
Extract frames from video
# Extract every frame as PNG
ffmpeg -i input.mp4 /output/frame_%04d.png

# Extract 1 frame per second
ffmpeg -i input.mp4 -vf fps=1 /output/frame_%04d.png

# Extract a single frame at timestamp
ffmpeg -ss 00:00:05 -i input.mp4 -frames:v 1 output.png
Image sequence → video or GIF
# Frames → MP4
ffmpeg -framerate 24 -i frame_%04d.png -c:v libx264 output.mp4

# Frames → GIF
ffmpeg -framerate 10 -i frame_%04d.png output.gif

ExifTool — Metadata

Read metadata
exiftool input.jpg
exiftool -s input.jpg                          # short tag names
exiftool -ImageSize -DateTimeOriginal input.jpg  # specific fields
Strip all metadata (privacy / pre-publish)
exiftool -all= input.jpg                       # strips in place (saves backup)
exiftool -all= -overwrite_original input.jpg   # no backup
exiftool -all= -overwrite_original /folder/*.jpg  # batch strip
Copy EXIF from one file to another
exiftool -TagsFromFile source.jpg target.jpg
Write metadata
exiftool -Artist="Ramon" -Copyright="© 2026 ReshareAI" input.jpg
exiftool -all= -overwrite_original -Artist="Ramon" /folder/*.jpg

OptiPNG — Lossless PNG Compression

# Optimize (overwrites in place, creates backup .bak)
optipng input.png

# No backup
optipng -o 7 input.png           # -o 7 is max compression (slower)

# Output to new file
optipng -out output.png input.png

# Batch
optipng /path/to/folder/*.png

# Check savings without writing
optipng -simulate input.png

Typical savings: 20–50% file size reduction with zero quality loss.


jpegoptim — Lossless JPEG Compression

# Lossless optimization (in place)
jpegoptim input.jpg

# With target file size
jpegoptim --size=200k input.jpg

# Strip all metadata + optimize
jpegoptim --strip-all input.jpg

# Batch (folder)
jpegoptim /path/to/folder/*.jpg

# Batch with max quality floor
jpegoptim --max=90 /path/to/folder/*.jpg

Poppler — PDF → Image

# All pages → PNG at 150 DPI (output: file-000001.png, file-000002.png ...)
pdftoppm -r 150 -png input.pdf /output/page

# All pages → JPEG
pdftoppm -r 150 -jpeg input.pdf /output/page

# Single page (page 1 only)
pdftoppm -r 300 -png -f 1 -l 1 input.pdf /output/page

# High DPI for print-quality extraction
pdftoppm -r 300 -png input.pdf /output/page

Inkscape — CLI Reference

SVG → PNG export (exact dimensions)
inkscape input.svg \
  --export-type=png \
  --export-filename=output.png \
  --export-width=1200 \
  --export-height=630
Export specific layer
inkscape input.svg \
  --export-type=png \
  --export-filename=output.png \
  --export-id=layer1 \
  --export-id-only
SVG → PDF
inkscape input.svg --export-type=pdf --export-filename=output.pdf
Create SVG from scratch (write file, then export)

Write a .svg file using the Write tool, then export with Inkscape. SVG template:

<?xml version="1.0" encoding="UTF-8"?>
<svg width="1200" height="630" viewBox="0 0 1200 630"
     xmlns="http://www.w3.org/2000/svg">

  <defs>
    <linearGradient id="bg" x1="0%" y1="0%" x2="100%" y2="100%">
      <stop offset="0%" style="stop-color:#4C1D95"/>
      <stop offset="100%" style="stop-color:#1E1B4B"/>
    </linearGradient>
  </defs>

  <rect width="1200" height="630" fill="url(#bg)"/>

  <!-- Text renders perfectly — no hallucination like GIMP/FLUX -->
  <text x="100" y="280"
        font-family="Inter, Arial, sans-serif"
        font-size="96" font-weight="700"
        fill="white">BrandName</text>

  <text x="100" y="360"
        font-family="Inter, Arial, sans-serif"
        font-size="32" fill="rgba(255,255,255,0.7)">Tagline goes here</text>

</svg>

GIMP — Script-Fu Batch Reference

Use GIMP for: compositing, color correction, photo editing, alpha channel work. For simple tasks prefer ImageMagick.

Resize to exact dimensions
gimp --no-interface --batch '(let* (
  (image (car (gimp-file-load RUN-NONINTERACTIVE "/path/input.png" "input.png")))
  (drawable (car (gimp-image-get-active-drawable image))))
  (gimp-image-scale-full image 1200 630 INTERPOLATION-LINEAR)
  (file-png-save RUN-NONINTERACTIVE image (car (gimp-image-get-active-drawable image))
    "/path/output.png" "output.png" 0 9 1 1 1 1 1))
(gimp-quit 0)'
Scale then crop (fill mode — covers full canvas)
gimp --no-interface --batch '(let* (
  (image (car (gimp-file-load RUN-NONINTERACTIVE "/path/input.jpg" "input.jpg")))
  (w (car (gimp-image-width image)))
  (h (car (gimp-image-height image)))
  (target-w 1200) (target-h 630)
  (scale (max (/ target-w w) (/ target-h h)))
  (new-w (inexact->exact (round (* w scale))))
  (new-h (inexact->exact (round (* h scale)))))
  (gimp-image-scale-full image new-w new-h INTERPOLATION-LINEAR)
  (gimp-image-crop image target-w target-h
    (/ (- new-w target-w) 2) (/ (- new-h target-h) 2))
  (file-png-save RUN-NONINTERACTIVE image (car (gimp-image-get-active-drawable image))
    "/path/output.png" "output.png" 0 9 1 1 1 1 1))
(gimp-quit 0)'
Add semi-transparent colour overlay
gimp --no-interface --batch '(let* (
  (image (car (gimp-file-load RUN-NONINTERACTIVE "/path/input.png" "input.png")))
  (overlay (car (gimp-layer-new image
    (car (gimp-image-width image))
    (car (gimp-image-height image))
    RGBA-IMAGE "overlay" 60 LAYER-MODE-NORMAL))))
  (gimp-image-insert-layer image overlay 0 -1)
  (gimp-context-set-foreground (list 0 0 0))
  (gimp-edit-fill overlay FILL-FOREGROUND)
  (file-png-save RUN-NONINTERACTIVE image (car (gimp-image-flatten image))
    "/path/output.png" "output.png" 0 9 1 1 1 1 1))
(gimp-quit 0)'
Composite: place image B on top of image A
gimp --no-interface --batch '(let* (
  (base (car (gimp-file-load RUN-NONINTERACTIVE "/path/base.png" "base.png")))
  (overlay-img (car (gimp-file-load RUN-NONINTERACTIVE "/path/overlay.png" "overlay.png")))
  (overlay-layer (car (gimp-layer-new-from-drawable
    (car (gimp-image-get-active-drawable overlay-img)) base))))
  (gimp-image-insert-layer base overlay-layer 0 -1)
  (gimp-layer-set-offsets overlay-layer 50 50)
  (file-png-save RUN-NONINTERACTIVE base (car (gimp-image-flatten base))
    "/path/output.png" "output.png" 0 9 1 1 1 1 1))
(gimp-quit 0)'
Brightness / contrast / saturation
gimp --no-interface --batch '(let* (
  (image (car (gimp-file-load RUN-NONINTERACTIVE "/path/input.jpg" "input.jpg")))
  (drawable (car (gimp-image-get-active-drawable image))))
  (gimp-brightness-contrast drawable 20 30)
  (gimp-drawable-hue-saturation drawable HUE-RANGE-ALL 0 0 25 0)
  (file-jpeg-save RUN-NONINTERACTIVE image drawable
    "/path/output.jpg" "output.jpg" 0.92 0 0 0 "" 0 1 0 2 0))
(gimp-quit 0)'

Recommended Workflow: OG Image / Social Banner

  1. Write an SVG file (exact layout, text, colors) using the Write tool
  2. Export with Inkscape at target dimensions — text is pixel-perfect
  3. Optimize with OptiPNG before publishing
# Step 1: write /tmp/card.svg

# Step 2: export
inkscape /tmp/card.svg \
  --export-type=png \
  --export-filename=/output/og.png \
  --export-width=1200 \
  --export-height=630

# Step 3: optimize
optipng -o 5 /output/og.png

Tips

  • Text accuracy: Inkscape SVG > ImageMagick -annotate > GIMP Script-Fu (avoid for text)
  • Speed hierarchy: ImageMagick > GIMP for simple ops; GIMP wins for complex compositing
  • GIMP --no-interface — always end scripts with (gimp-quit 0)
  • Script-Fu paths must be absolute — no ~/ shortcuts
  • GIMP opacity is 0–100 (integer), not 0.0–1.0
  • Inkscape 1.1 uses --export-type + --export-filename (older versions used --export-png)
  • ImageMagick ! suffix on geometry forces exact dimensions ignoring aspect ratio (1200x630!)

Comments

Markdown supported