A powerful image manipulation plugin for Osaurus. Provides 15 tools for image conversion, manipulation, optimization, filtering, and composition.
- Format Conversion - Convert between PNG, JPEG, GIF, TIFF, BMP, HEIC, and WebP
- Image Manipulation - Rotate, flip, crop, and resize images
- Optimization - Reduce file size while maintaining quality
- Metadata - Extract image info and strip EXIF data for privacy
- Filters - Apply grayscale, sepia, blur, sharpen, and invert effects
- Color Analysis - Extract dominant colors from images
- Composition - Add watermarks, borders, rounded corners, and overlay images
Convert an image to a different format.
| Parameter | Type | Required | Description |
|---|---|---|---|
input_path |
string | Yes | Path to the input image |
output_format |
string | Yes | Target format: png, jpeg, gif, tiff, bmp, heic, webp |
Example: Convert PNG to JPEG
{ "input_path": "/path/to/image.png", "output_format": "jpeg" }Reduce image file size by re-encoding with compression.
| Parameter | Type | Required | Description |
|---|---|---|---|
input_path |
string | Yes | Path to the input image |
quality |
number | No | Quality level 0.0-1.0 (default: 0.8) |
Example: Optimize with 70% quality
{ "input_path": "/path/to/image.png", "quality": 0.7 }Rotate an image by a specified angle.
| Parameter | Type | Required | Description |
|---|---|---|---|
input_path |
string | Yes | Path to the input image |
degrees |
number | Yes | Rotation angle (positive = counter-clockwise) |
Example: Rotate 90 degrees
{ "input_path": "/path/to/image.png", "degrees": 90 }Flip an image horizontally or vertically.
| Parameter | Type | Required | Description |
|---|---|---|---|
input_path |
string | Yes | Path to the input image |
direction |
string | Yes | horizontal or vertical |
Example: Mirror horizontally
{ "input_path": "/path/to/image.png", "direction": "horizontal" }Crop an image to a specified region.
| Parameter | Type | Required | Description |
|---|---|---|---|
input_path |
string | Yes | Path to the input image |
x |
integer | Yes | X coordinate of top-left corner |
y |
integer | Yes | Y coordinate of top-left corner |
width |
integer | Yes | Width of crop region |
height |
integer | Yes | Height of crop region |
Example: Crop 100x100 region from (50, 50)
{
"input_path": "/path/to/image.png",
"x": 50,
"y": 50,
"width": 100,
"height": 100
}Resize an image to new dimensions or scale.
| Parameter | Type | Required | Description |
|---|---|---|---|
input_path |
string | Yes | Path to the input image |
width |
integer | No | New width in pixels |
height |
integer | No | New height in pixels |
scale |
number | No | Scale percentage (e.g., 50 = half size) |
Examples:
// Resize to specific width (height auto-calculated)
{"input_path": "/path/to/image.png", "width": 800}
// Resize to exact dimensions
{"input_path": "/path/to/image.png", "width": 800, "height": 600}
// Scale to 50%
{"input_path": "/path/to/image.png", "scale": 50}Get metadata and information about an image.
| Parameter | Type | Required | Description |
|---|---|---|---|
input_path |
string | Yes | Path to the input image |
Response includes: width, height, format, file_size, color_model, bit_depth, dpi, has_alpha, exif data
Example:
{ "input_path": "/path/to/image.png" }Remove EXIF and other metadata from an image for privacy.
| Parameter | Type | Required | Description |
|---|---|---|---|
input_path |
string | Yes | Path to the input image |
Example:
{ "input_path": "/path/to/photo.jpg" }Adjust brightness, contrast, and saturation.
| Parameter | Type | Required | Description |
|---|---|---|---|
input_path |
string | Yes | Path to the input image |
brightness |
number | No | -1.0 to 1.0 (default: 0) |
contrast |
number | No | 0.0 to 2.0 (default: 1) |
saturation |
number | No | 0.0 to 2.0 (default: 1) |
Example: Increase brightness and saturation
{ "input_path": "/path/to/image.png", "brightness": 0.2, "saturation": 1.5 }Apply a visual filter effect.
| Parameter | Type | Required | Description |
|---|---|---|---|
input_path |
string | Yes | Path to the input image |
filter |
string | Yes | grayscale, sepia, blur, sharpen, invert |
intensity |
number | No | Filter intensity 0.0-1.0 (default: 1.0) |
Examples:
// Convert to grayscale
{"input_path": "/path/to/image.png", "filter": "grayscale"}
// Apply sepia with 80% intensity
{"input_path": "/path/to/image.png", "filter": "sepia", "intensity": 0.8}
// Apply blur
{"input_path": "/path/to/image.png", "filter": "blur", "intensity": 0.5}Extract dominant colors from an image.
| Parameter | Type | Required | Description |
|---|---|---|---|
input_path |
string | Yes | Path to the input image |
count |
integer | No | Number of colors to extract (default: 5) |
Example:
{ "input_path": "/path/to/image.png", "count": 5 }Response:
{ "colors": ["#FF5500", "#003366", "#FFFFFF", "#000000", "#808080"] }Add a text or image watermark.
| Parameter | Type | Required | Description |
|---|---|---|---|
input_path |
string | Yes | Path to the input image |
text |
string | No* | Text to use as watermark |
image_path |
string | No* | Path to watermark image |
position |
string | No | top-left, top-right, bottom-left, bottom-right, center (default: bottom-right) |
opacity |
number | No | Opacity 0.0-1.0 (default: 0.5) |
*Either text or image_path must be provided.
Examples:
// Text watermark
{"input_path": "/path/to/image.png", "text": "© 2024", "position": "bottom-right", "opacity": 0.7}
// Image watermark (logo)
{"input_path": "/path/to/image.png", "image_path": "/path/to/logo.png", "position": "top-left"}Overlay one image on top of another.
| Parameter | Type | Required | Description |
|---|---|---|---|
base_path |
string | Yes | Path to the base image |
overlay_path |
string | Yes | Path to the overlay image |
x |
integer | Yes | X position for overlay |
y |
integer | Yes | Y position for overlay |
opacity |
number | No | Overlay opacity 0.0-1.0 (default: 1.0) |
Example:
{
"base_path": "/path/to/background.png",
"overlay_path": "/path/to/foreground.png",
"x": 100,
"y": 50,
"opacity": 0.8
}Add a solid color border around an image.
| Parameter | Type | Required | Description |
|---|---|---|---|
input_path |
string | Yes | Path to the input image |
width |
integer | Yes | Border width in pixels |
color |
string | Yes | Border color in hex format (e.g., #FF0000) |
Example:
{ "input_path": "/path/to/image.png", "width": 10, "color": "#FF5500" }Round the corners of an image. Outputs PNG to preserve transparency.
| Parameter | Type | Required | Description |
|---|---|---|---|
input_path |
string | Yes | Path to the input image |
radius |
integer | Yes | Corner radius in pixels |
Example:
{ "input_path": "/path/to/image.png", "radius": 20 }| Format | Extensions | Read | Write |
|---|---|---|---|
| PNG | .png |
✓ | ✓ |
| JPEG | .jpg, .jpeg |
✓ | ✓ |
| GIF | .gif |
✓ | ✓ |
| TIFF | .tiff, .tif |
✓ | ✓ |
| BMP | .bmp |
✓ | ✓ |
| HEIC | .heic, .heif |
✓ | ✓ |
| WebP | .webp |
✓ | ✓ |
swift build -c releaseswift test_plugin.swiftosaurus manifest extract .build/release/libosaurus-images.dylibosaurus tools package osaurus.images 0.1.0Creates osaurus.images-0.1.0.zip.
osaurus tools install ./osaurus.images-0.1.0.zipThis project includes a GitHub Actions workflow that automatically builds and releases when you push a version tag:
git tag v0.1.0
git push origin v0.1.0- macOS 15.0+
- Osaurus 0.5.0+
MIT