Skip to main content
Glama

Transform Layer

photopea_transform_layer

Scale, rotate, or flip image layers in-place to resize and reorient content. Modify layer dimensions, rotation, and mirror effects with precise parameters within Photopea.

Instructions

Scale, rotate, or flip a layer in-place. Modifies the layer's pixel data destructively. Use get_layers to check current layer bounds before transforming, and undo to revert if needed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetYesLayer name (string) or index (number)
scaleXNoHorizontal scale factor (1.0 = no change, 0.5 = half size, 2.0 = double size)
scaleYNoVertical scale factor (1.0 = no change, 0.5 = half size, 2.0 = double size)
rotationNoRotation angle in degrees (positive = clockwise, negative = counter-clockwise)
flipHNoFlip the layer horizontally (mirror left-right)
flipVNoFlip the layer vertically (mirror top-bottom)

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/attalla1/photopea-mcp-server'

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