Rotate
Rotate an image by a fixed angle or an arbitrary float angle, optionally flip it, and fill any exposed canvas area with a background color.Parameters
Must be
"rotate".Path to the source image.
Path for the rotated output file.
Fixed rotation angle in degrees. Accepted values:
0, 90, 180, 270. Either angle or angle_f is required (unless using auto_orient or flip alone).Arbitrary rotation angle in degrees. Range:
-360 to 360. Exposed canvas corners are filled with background. Either angle or angle_f is required.Mirror the image.
"horizontal" reflects left-to-right; "vertical" reflects top-to-bottom. Can be combined with angle or angle_f.When
true, reads the EXIF orientation tag and applies the corresponding transformation so the image displays correctly, then strips that tag.Background fill color for canvas areas exposed by non-90° rotation. Hex format:
"#RRGGBB".Output format:
png, jpeg, webp, or avif.Encode quality for JPEG and WebP outputs. Range: 1–100.
When
true, the output is also returned as a base64-encoded string in data_base64.Go client
Examples
Go examples
Watermark
Composite a text string or an image file over a source image, controlling position, opacity, and offset.Parameters
Must be
"watermark".Path to the source image.
Path for the watermarked output file.
Text string to render as the watermark. Either
text or image is required.Path to an image file to composite as the watermark. Either
text or image is required.Position of the watermark on the canvas. See the position grid below.
Watermark opacity. Range:
0.0 (fully transparent) to 1.0 (fully opaque).Font size in pixels for text watermarks.
Text color in hex format
"#RRGGBB". Applies to text watermarks only.Horizontal offset from the nearest edge in pixels.
Vertical offset from the nearest edge in pixels.
Output format:
png, jpeg, webp, or avif.Encode quality for JPEG and WebP outputs. Range: 1–100.
When
true, the output is also returned as a base64-encoded string in data_base64.Position grid
Theposition field accepts a value from the 3×3 grid below:
| Left | Center | Right | |
|---|---|---|---|
| Top | top-left | top-center | top-right |
| Middle | center-left | center | center-right |
| Bottom | bottom-left | bottom-center | bottom-right |
top, bottom, left, right, middle) are also accepted.
Go client
Examples
Go examples
Adjust
Modify tonal and focus properties of an image: brightness, contrast, saturation, Gaussian blur, and sharpening.Parameters
Must be
"adjust".Path to the source image.
Path for the adjusted output file.
Brightness adjustment. Range:
-1.0 (fully black) to 1.0 (fully white). 0.0 means no change.Contrast adjustment. Range:
-1.0 to 1.0. 0.0 means no change.Saturation adjustment. Range:
-1.0 (grayscale) to 1.0 (maximum saturation). 0.0 means no change.Gaussian blur sigma. Range:
0.0 to 50.0. Omit or set to null for no blur.Sharpening amount. Range:
0.0 to 10.0. Omit or set to null for no sharpening.When
true (the default), tonal adjustments are applied in linear light. Produces perceptually correct results for brightness and contrast changes.Output format:
png, jpeg, webp, or avif.Encode quality for JPEG and WebP outputs. Range: 1–100.
When
true, the output is also returned as a base64-encoded string in data_base64.Go client
Examples
Go examples