Modules@robinpath/image
@robinpath/image
0.1.0PublicImage processing: resize, crop, convert, watermark, and metadata
@robinpath/image
Image processing with Sharp: resize, crop, convert, rotate, flip, grayscale, blur, composite/watermark, and thumbnails
Why use this module?
The image module lets you:
- Resize an image
- Crop a region from an image
- Convert image format (png, jpeg, webp, avif)
- Get image metadata
- Rotate an image
All functions are callable directly from RobinPath scripts with a simple, consistent API.
Installation
npm install @robinpath/image
Quick Start
No credentials needed — start using it right away:
image.crop "./photo.jpg" "./cropped.jpg" {"left": 10, "top": 10, "width": 200, "height": 200}
Available Functions
| Function | Description |
|---|---|
image.resize | Resize an image |
image.crop | Crop a region from an image |
image.convert | Convert image format (png, jpeg, webp, avif) |
image.metadata | Get image metadata |
image.rotate | Rotate an image |
image.flip | Flip an image vertically or horizontally |
image.grayscale | Convert to grayscale |
image.blur | Apply Gaussian blur |
image.composite | Overlay one image on top of another (watermark) |
image.thumbnail | Generate a square thumbnail |
Examples
Crop a region from an image
image.crop "./photo.jpg" "./cropped.jpg" {"left": 10, "top": 10, "width": 200, "height": 200}
Convert image format (png, jpeg, webp, avif)
image.convert "./photo.png" "./photo.webp" "webp" 85
Get image metadata
image.metadata "./photo.jpg"
Integration with RobinPath
import { RobinPath } from "@wiredwp/robinpath";
import Module from "@robinpath/image";
const rp = new RobinPath();
rp.registerModule(Module.name, Module.functions);
rp.registerModuleMeta(Module.name, Module.functionMetadata);
const result = await rp.executeScript(`
image.crop "./photo.jpg" "./cropped.jpg" {"left": 10, "top": 10, "width": 200, "height": 200}
`);
Full API Reference
See MODULE.md for complete documentation including all parameters, return types, error handling, and advanced examples.
Related Modules
@robinpath/json— JSON module for complementary functionality
License
MIT
Versions (1)
| Version | Tag | Published |
|---|---|---|
| 0.1.0 | latest | yesterday |
Related Modules
utilities
1
@dev-tester/hello-world
v2.0.0dev-tester
Updated description
0 downloads
...
utilities
0
@robinpath/apollo
v0.1.1robinpath
Apollo module for RobinPath.
0 downloads
...
utilities
0
@robinpath/archive
v0.1.1robinpath
Create and extract .zip and .tar.gz file archives
0 downloads
...
utilities
0
@robinpath/assert
v0.1.1robinpath
Testing assertions: equal, deepEqual, truthy, falsy, type checks, includes, matches, throws, and more
0 downloads
...
Install
$ robinpath install @robinpath/image Version0.1.0
LicenseMIT
Unpacked Size4.3 KB
Versions1
Weekly Downloads0
Total Downloads0
Stars0
Last Publishyesterday
Createdyesterday

