automotive
Vehicle/automotive image editing for cars, trucks, SUVs, motorcycles — car scenes, reflections, tires refinement with snow/mud/grass, segment…
Classic image manipulation with Python Pillow - resize, crop, composite, format conversion, watermarks, brightness/contrast adjustments, and web optimization. Use this skill when post-processing AI-generated images, preparing images for web delivery, batch processing image
$ npx -y skills add Bria-AI/bria-skill --skill image-utils --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/image-utilsContext preview
The summary Claude sees to decide when to auto-load this skill.
Classic image manipulation with Python Pillow - resize, crop, composite, format conversion, watermarks, brightness/contrast adjustments, and web optimization. Use this skill when post-processing AI-generated images, preparing images for web delivery, batch processing image
name: image-utils description: Classic image manipulation with Python Pillow - resize, crop, composite, format conversion, watermarks, brightness/contrast adjustments, and web optimization. Use this skill when post-processing AI-generated images, preparing images for web delivery, batch processing image directories, creating responsive image variants, or performing any deterministic pixel-level image operation. Works standalone or alongside bria-ai for post-processing generated images. license: MIT metadata: author: Bria AI version: "1.3.7"
Pillow-based utilities for deterministic pixel-level image operations. Use for resize, crop, composite, format conversion, watermarks, and other standard image processing tasks.
This skill handles **deterministic pixel-level operations** only. For any **generative or AI-powered** image work, use the `bria-ai` skill instead:
**Rule of thumb**: If the task requires *creating new visual content* or *understanding image semantics*, use `bria-ai`. If the task requires *transforming existing pixels* (resize, crop, format convert, watermark), use this skill.
If `bria-ai` is not available, install it with:
npx skills add bria-ai/bria-skill
| Operation | Method | Description | |-----------|--------|-------------| | **Loading** | `load(source)` | Load from URL, path, bytes, or base64 | | | `load_from_url(url)` | Download image from URL | | **Saving** | `save(image, path)` | Save with format auto-detection | | | `to_bytes(image, format)` | Convert to bytes | | | `to_base64(image, format)` | Convert to base64 string | | **Resizing** | `resize(image, width, height)` | Resize to exact dimensions | | | `scale(image, factor)` | Scale by factor (0.5 = half) | | | `thumbnail(image, size)` | Fit within size, maintain aspect | | **Cropping** | `crop(image, left, top, right, bottom)` | Crop to region | | | `crop_center(image, width, height)` | Crop from center | | | `crop_to_aspect(image, ratio)` | Crop to aspect ratio | | **Compositing** | `paste(bg, fg, position)` | Overlay at coordinates | | | `composite(bg, fg, mask)` | Alpha composite | | | `fit_to_canvas(image, w, h)` | Fit onto canvas size | | **Borders** | `add_border(image, width, color)` | Add solid border | | | `add_padding(image, padding)` | Add whitespace padding | | **Transforms** | `rotate(image, angle)` | Rotate by degrees | | | `flip_horizontal(image)` | Mirror horizontally | | | `flip_vertical(image)` | Flip vertically | | **Watermarks** | `add_text_watermark(image, text)` | Add text overlay | | | `add_image_watermark(image, logo)` | Add logo watermark | | **Adjustments** | `adjust_brightness(image, factor)` | Lighten/darken | | | `adjust_contrast(image, factor)` | Adjust contrast | | | `adjust_saturation(image, factor)` | Adjust color saturation | | | `blur(image, radius)` | Apply Gaussian blur | | **Web** | `optimize_for_web(image, max_size)` | Optimize for delivery | | **Info** | `get_info(image)` | Get dimensions, format, mode |
pip install Pillow requests
from image_utils import ImageUtils
# Load from URL
image = ImageUtils.load_from_url("https://example.com/image.jpg")
# Or load from various sources
image = ImageUtils.load("/path/to/image.png") # File path
image = ImageUtils.load(image_bytes) # Bytes
image = ImageUtils.load("data:image/png;base64,...") # Base64
# Resize and save
resized = ImageUtils.resize(image, width=800, height=600)
ImageUtils.save(resized, "output.webp", quality=90)
# Get image info
info = ImageUtils.get_info(image)
print(f"{info['width']}x{info['height']} {info['mode']}")# Resize to exact dimensions resized = ImageUtils.resize(image, width=800, height=600) # Resize maintaining aspect ratio (fit within bounds) fitted = ImageUtils.resize(image, width=800, height=600, maintain_aspect=True) # Resize by width only (height auto-calculated) resized = ImageUtils.resize(image, width=800) # Scale by factor half = ImageUtils.scale(image, 0.5) # 50% size double = ImageUtils.scale(image, 2.0) # 200% size # Create thumbnail thumb = ImageUtils.thumbnail(image, (150, 150))
# Crop to specific region cropped = ImageUtils.crop(image, left=100, top=50, right=500, bottom=350) # Crop from center center = ImageUtils.crop_center(image, width=400, height=400) # Crop to aspect ratio (for social media) square = ImageUtils.crop_to_aspect(image, "1:1") # Instagram wide = ImageUtils.crop_to_aspect(image, "16:9") # YouTube thumbnail story = ImageUtils.crop_to_aspect(image, "9:16") # Stories/Reels # Control crop anchor top_crop = ImageUtils.crop_to_aspect(image, "16:9", anchor="top") bottom_crop = ImageUtils.crop_to_aspect(image, "16:9", anchor="bottom")
# Paste foreground onto background result = ImageUtils.paste(background, foreground, position=(100, 50)) # Alpha composite (foreground must have transparency) result = ImageUtils.composite(background, foregrou
Generate, edit, and precisely control images directly from your AI coding agent using Bria.ai's commercially-safe models.
Vehicle/automotive image editing for cars, trucks, SUVs, motorcycles — car scenes, reflections, tires refinement with snow/mud/grass, segment…
Image generation, photo editing, background removal — transparent PNG images, cutouts, ecommerce packshots, product catalogs, lifestyle shots via Bria.ai.…
Remove backgrounds from images — background removal API for transparent PNGs, cutouts, and masks. Segment foreground from background. Powered by Bria RMBG 2.0.…
Maximum control over AI image generation — write structured VGL (Visual Generation Language) JSON that explicitly controls every visual attribute. Define exact…
Remove backgrounds from videos — video background removal API for transparent videos, alpha-channel clips, and green-screen-free footage. Powered by Bria's…
Turn a finished, flat ad image back into editable layers — background, product shot, logo, headline, body copy and CTA, each returned as its own asset with…