app-store-image-enhancer
Enhances image resolution, sharpness, and clarity using Python/Pillow. Perfect for app store icons (1024x1024), screenshots, and social media images.
What this skill does
# App Store Image Enhancer
Enhance images to be sharper, clearer, and more professional using Python's Pillow library.
## When to Use This Skill
- Preparing app icons for App Store/Google Play (must be 1024x1024 PNG)
- Improving screenshot quality for documentation or marketing
- Enhancing images for social media posts
- Upscaling low-resolution images
- Sharpening blurry photos
- Cleaning up compression artifacts
## Implementation
### Required Setup
```bash
pip install Pillow --break-system-packages
```
### Core Enhancement Script
```python
from PIL import Image, ImageEnhance, ImageFilter
import os
def enhance_image(
input_path: str,
output_path: str = None,
target_size: tuple = None,
sharpen_factor: float = 1.5,
contrast_factor: float = 1.1,
mode: str = "general"
) -> str:
"""
Enhance an image with sharpening, contrast adjustment, and optional resizing.
Args:
input_path: Path to the source image
output_path: Path for enhanced image (default: adds '-enhanced' suffix)
target_size: Tuple of (width, height) for resizing, or None to preserve
sharpen_factor: Sharpness multiplier (1.0 = original, >1.0 = sharper)
contrast_factor: Contrast multiplier (1.0 = original, >1.0 = more contrast)
mode: "app-icon", "screenshot", or "general"
Returns:
Path to the enhanced image
"""
# Open and convert to RGBA for transparency support
img = Image.open(input_path)
original_mode = img.mode
if img.mode != 'RGBA':
img = img.convert('RGBA')
# Apply mode-specific settings
if mode == "app-icon":
target_size = (1024, 1024)
sharpen_factor = 1.8
contrast_factor = 1.15
elif mode == "screenshot":
sharpen_factor = 1.4
contrast_factor = 1.05
# Resize if target size specified (use LANCZOS for quality)
if target_size:
img = img.resize(target_size, Image.Resampling.LANCZOS)
# Apply unsharp mask for edge enhancement
img = img.filter(ImageFilter.UnsharpMask(radius=2, percent=150, threshold=3))
# Enhance sharpness
sharpener = ImageEnhance.Sharpness(img)
img = sharpener.enhance(sharpen_factor)
# Enhance contrast
contraster = ImageEnhance.Contrast(img)
img = contraster.enhance(contrast_factor)
# Generate output path if not provided
if not output_path:
base, ext = os.path.splitext(input_path)
output_path = f"{base}-enhanced.png"
# Save as PNG for quality (convert to RGB if no transparency needed)
if mode == "app-icon" or output_path.lower().endswith('.png'):
img.save(output_path, 'PNG', optimize=True)
else:
# For JPG output, convert to RGB
if img.mode == 'RGBA':
background = Image.new('RGB', img.size, (255, 255, 255))
background.paste(img, mask=img.split()[3])
img = background
img.save(output_path, quality=95, optimize=True)
return output_path
def analyze_image(input_path: str) -> dict:
"""
Analyze image quality metrics.
Args:
input_path: Path to the image
Returns:
Dictionary with image analysis results
"""
img = Image.open(input_path)
return {
"path": input_path,
"format": img.format,
"mode": img.mode,
"size": img.size,
"width": img.size[0],
"height": img.size[1],
"is_square": img.size[0] == img.size[1],
"has_transparency": img.mode in ('RGBA', 'LA', 'P'),
"file_size_kb": os.path.getsize(input_path) / 1024,
"meets_app_icon_spec": img.size[0] >= 1024 and img.size[1] >= 1024
}
def batch_enhance(
directory: str,
output_dir: str = None,
extensions: tuple = ('.png', '.jpg', '.jpeg', '.webp'),
**enhance_kwargs
) -> list:
"""
Enhance all images in a directory.
Args:
directory: Source directory path
output_dir: Output directory (default: same as source with '-enhanced' suffix)
extensions: Tuple of file extensions to process
**enhance_kwargs: Arguments passed to enhance_image()
Returns:
List of output file paths
"""
if not output_dir:
output_dir = f"{directory.rstrip('/')}-enhanced"
os.makedirs(output_dir, exist_ok=True)
results = []
for filename in os.listdir(directory):
if filename.lower().endswith(extensions):
input_path = os.path.join(directory, filename)
base, _ = os.path.splitext(filename)
output_path = os.path.join(output_dir, f"{base}-enhanced.png")
enhance_image(input_path, output_path, **enhance_kwargs)
results.append(output_path)
return results
```
## Usage Examples
### App Store Icon Enhancement
```python
# Enhance for app store (auto-resizes to 1024x1024)
result = enhance_image("my-icon.png", mode="app-icon")
print(f"Enhanced icon saved to: {result}")
```
### Screenshot Enhancement
```python
# Enhance screenshot without resizing
result = enhance_image("screenshot.png", mode="screenshot")
```
### Custom Enhancement
```python
# Custom settings
result = enhance_image(
"photo.jpg",
target_size=(2048, 2048),
sharpen_factor=2.0,
contrast_factor=1.2
)
```
### Batch Processing
```python
# Enhance all images in a folder
enhanced_files = batch_enhance("./images", mode="screenshot")
print(f"Enhanced {len(enhanced_files)} images")
```
## App Store Icon Requirements
| Platform | Size | Format | Notes |
| --------------- | --------- | ------ | --------------------------------------------------- |
| iOS App Store | 1024×1024 | PNG | No transparency, no rounded corners (iOS adds them) |
| Google Play | 512×512 | PNG | Can have transparency |
| macOS App Store | 1024×1024 | PNG | Can have transparency |
**Important**: iOS App Store icons should NOT have transparency—use a solid background. The system applies the rounded corners automatically.
## Output Specifications
When `mode="app-icon"`:
- Size: 1024×1024 pixels
- Format: PNG
- Sharpness: Enhanced (1.8x)
- Contrast: Slightly boosted (1.15x)
- Optimized file size
## Tips
- Always preserve originals (the script creates new files by default)
- Use `mode="app-icon"` for store submissions
- Use `mode="screenshot"` for documentation images
- For social media, consider platform-specific sizes after enhancement
- JPG output is supported but PNG is preferred for icons
Related in Image & Video
watch
IncludedWatch a video (URL or local path). Downloads with yt-dlp, extracts auto-scaled frames with ffmpeg, pulls the transcript from captions (or Whisper API fallback), and hands the result to Claude so it can answer questions about what's in the video.
physical-ai-defect-image-generation
IncludedUse when the user wants to orchestrate defect image generation, run associated setup, or handle outputs on OSMO. The Day 0 path handles cold-start with USD-to-ROI, image-edit augmentation, and AnomalyGen to create initial PCBA datasets. The Day 1 path performs inference and labeling on real images. This skill helps with first-time asset setup, creation of finetuning checkpoints, and configuring deployment. Trigger keywords: defect image generation, dig workflow, dig pipeline, defect image detection workflow, aoi pipeline, aoi anomalygen, usd2roi anomalygen, day 0 pcba, day 1 pcba, day 1 real-photo alignment, day 1 manual roi, metal surface anomaly, glass defect, anomalygen finetune, setup_pcb, setup_metal, setup_glass, setup_pretrained, dig setup, dig datasets, dig pretrained checkpoint, dig image-edit endpoint.
accelint-react-best-practices
IncludedReact performance optimization and best practices. ALWAYS use this skill when working with any React code - writing components, hooks, JSX; refactoring; optimizing re-renders, memoization, state management; reviewing for performance; fixing hydration mismatches; debugging infinite re-renders, stale closures, input focus loss, animations restarting; preventing remounting; implementing transitions, lazy initialization, effect dependencies. Even simple React tasks benefit from these patterns. Covers React 19+ (useEffectEvent, Activity, ref props). Triggers - useEffect, useState, useMemo, useCallback, memo, inline components, nested components, components inside components, re-render, performance, hydration, SSR, Next.js, useDeferredValue, combined hooks.
elevenlabs-agents
IncludedBuild conversational AI voice agents with ElevenLabs Platform using React, JavaScript, React Native, or Swift SDKs. Configure agents, tools (client/server/MCP), RAG knowledge bases, multi-voice, and Scribe real-time STT. Use when: building voice chat interfaces, implementing AI phone agents with Twilio, configuring agent workflows or tools, adding RAG knowledge bases, testing with CLI "agents as code", or troubleshooting deprecated @11labs packages, Android audio cutoff, CSP violations, dynamic variables, or WebRTC config. Keywords: ElevenLabs Agents, ElevenLabs voice agents, AI voice agents, conversational AI, @elevenlabs/react, @elevenlabs/client, @elevenlabs/react-native, @elevenlabs/elevenlabs-js, @elevenlabs/agents-cli, elevenlabs SDK, voice AI, TTS, text-to-speech, ASR, speech recognition, turn-taking model, WebRTC voice, WebSocket voice, ElevenLabs conversation, agent system prompt, agent tools, agent knowledge base, RAG voice agents, multi-voice agents, pronunciation dictionary, voice speed control, elevenlabs scribe, @11labs deprecated, Android audio cutoff, CSP violation elevenlabs, dynamic variables elevenlabs, case-sensitive tool names, webhook authentication
humanizer
IncludedHumanize AI-generated text by detecting and removing patterns typical of LLM output. Rewrites text to sound natural, specific, and human. Uses 28 pattern detectors, 560+ AI vocabulary terms across 3 tiers, and statistical analysis (burstiness, type-token ratio, readability) for comprehensive detection. Use when asked to humanize text, de-AI writing, make content sound more natural/human, review writing for AI patterns, score text for AI detection, or improve AI-generated drafts. Covers content, language, style, communication, and filler categories.
generating-mermaid-diagrams
IncludedSalesforce architecture diagrams using Mermaid with ASCII fallback. Use this skill when generating text-based diagrams for Salesforce architecture, OAuth flows, ERDs, integration sequences, or Agentforce structure. TRIGGER when: user says "diagram", "visualize", "ERD", or asks for sequence diagrams, flowcharts, class diagrams, or architecture visualizations in Mermaid. DO NOT TRIGGER when: user wants PNG/SVG image output (use generating-visual-diagrams), or asks about non-Salesforce systems.