Skip to main content
Glama

resize_image

Resize images by specifying dimensions or scale factor while preserving aspect ratio. Adjust width, height, or scale to modify image size for different requirements.

Instructions

Resize an image by dimensions or scale factor.

Provide width/height, or a scale factor (e.g. 0.5 for half size). By default, aspect ratio is preserved. If only width or height is given, the other dimension is calculated automatically.

Args: path: Absolute path to the image file. width: Target width in pixels. height: Target height in pixels. scale: Scale factor (e.g. 0.5 = half, 2.0 = double). keep_aspect_ratio: Preserve aspect ratio when both width and height given. output_path: Where to save. Defaults to _resized. next to input.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
widthNo
heightNo
scaleNo
keep_aspect_ratioNo
output_pathNo

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Adityaaery20/media-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server