home / skills / eyadsibai / ltk / image-enhancement

This skill helps you enhance image quality for documentation and presentations by upscaling, sharpening, and optimizing photos.

npx playbooks add skill eyadsibai/ltk --skill image-enhancement

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
2.6 KB
---
name: image-enhancement
description: Use when "improving image quality", "enhancing screenshots", "upscaling images", "sharpening photos", or asking about "image optimization", "screenshot quality", "resolution improvement"
version: 1.0.0
---

<!-- Adapted from: awesome-claude-skills/image-enhancer -->

# Image Enhancement Guide

Improve image quality for documentation, presentations, and social media.

## When to Use

- Improving screenshot quality for blog posts
- Enhancing images for social media
- Preparing images for presentations
- Upscaling low-resolution images
- Sharpening blurry photos
- Cleaning up compressed images

## Enhancement Workflow

1. **Analyze** - Check resolution, sharpness, artifacts
2. **Enhance** - Apply appropriate improvements
3. **Optimize** - Adjust for intended use case
4. **Save** - Preserve original, save enhanced version

## Python Enhancement Script

```python
from PIL import Image, ImageEnhance, ImageFilter

def enhance_image(input_path, output_path):
    img = Image.open(input_path)

    # Upscale if small
    if img.width < 1920:
        scale = 1920 / img.width
        new_size = (int(img.width * scale), int(img.height * scale))
        img = img.resize(new_size, Image.LANCZOS)

    # Sharpen
    img = img.filter(ImageFilter.SHARPEN)

    # Enhance contrast slightly
    enhancer = ImageEnhance.Contrast(img)
    img = enhancer.enhance(1.1)

    img.save(output_path, quality=95)
    return img.size

# Usage
enhance_image('screenshot.png', 'screenshot-enhanced.png')
```

## ImageMagick Commands

```bash
# Sharpen image
convert input.png -sharpen 0x1 output.png

# Upscale 2x with good quality
convert input.png -resize 200% -filter Lanczos output.png

# Remove compression artifacts
convert input.jpg -enhance output.jpg

# Batch process folder
for f in *.png; do
    convert "$f" -sharpen 0x1 "enhanced-$f"
done
```

## Optimization by Use Case

| Use Case | Resolution | Format | Quality |
|----------|------------|--------|---------|
| Web/Blog | 1920px wide | PNG/WebP | 85-95% |
| Social Media | Platform-specific | JPG | 90% |
| Presentations | 2560px+ | PNG | 95% |
| Print | 300 DPI minimum | PNG/TIFF | 100% |

## Social Media Sizes

| Platform | Recommended Size |
|----------|-----------------|
| Twitter | 1200x675 |
| LinkedIn | 1200x627 |
| Instagram | 1080x1080 |
| Facebook | 1200x630 |

## Tips

- Always keep original files as backup
- PNG for screenshots (lossless)
- JPG for photos (smaller size)
- WebP for web (best compression)
- Batch process for multiple files

## Required Tools

```bash
# Python
pip install Pillow

# ImageMagick
sudo apt-get install imagemagick

# For advanced upscaling
pip install opencv-python
```

Overview

This skill improves image quality for documentation, presentations, and social media by applying upscaling, sharpening, contrast adjustments, and format optimization. It provides simple, repeatable workflows and scripts for both Python (Pillow) and ImageMagick so you can quickly enhance single images or batch-process folders.

How this skill works

The skill inspects image resolution, sharpness, and compression artifacts, then applies targeted actions: upscale small images, sharpen details, adjust contrast, and export in the format and quality appropriate for the target use. It includes a Python example using Pillow and command-line ImageMagick recipes for common operations and batch processing.

When to use it

  • Improving screenshot quality for blog posts or documentation
  • Upscaling low-resolution images for presentations or prints
  • Sharpening slightly blurry photos or scanned documents
  • Removing compression artifacts from JPEGs
  • Preparing images with platform-specific sizes for social media

Best practices

  • Always keep an untouched original copy before editing
  • Choose PNG or WebP for screenshots and graphics; JPG for photos
  • Upscale only as much as necessary and use Lanczos or advanced upscalers
  • Apply subtle sharpening and contrast boosts to avoid artifacts
  • Batch-process consistent sets of images with the same settings

Example use cases

  • Enhance a 1280px screenshot to 1920px for a blog hero image with mild sharpening and 90% quality WebP export
  • Batch-sharpen and export all presentation images to 2560px PNG for a slide deck
  • Clean up compressed photos from a phone by removing artifacts and boosting contrast for social posts
  • Run a script to upscale and convert product screenshots to platform-specific sizes for marketing

FAQ

Will upscaling always improve image detail?

Upscaling increases pixel dimensions but cannot create true new detail; use high-quality resampling (Lanczos) or specialized upscalers for better results.

Which format should I pick for web delivery?

Use WebP for best compression with quality, PNG for lossless screenshots, and JPG for photographic content when file size is a concern.

Can I batch-process many images?

Yes—ImageMagick and simple Python loops with Pillow support efficient batch processing while preserving originals.