{
  "slug": "image-perspective-warp",
  "name": "gizza-ai/image-perspective-warp",
  "version": "0.1.0",
  "title": "Perspective Warp an Image Online — Keystone Correction & Tilt — gizza.ai",
  "description": "Apply a four-corner perspective transform to a photo — straighten skewed documents or add tilt with pixel corners and W/H edge constants.",
  "tags": [
    "image",
    "perspective",
    "warp",
    "keystone",
    "skew correction",
    "deskew",
    "four-corner",
    "transform",
    "tilt",
    "distort",
    "document",
    "photo"
  ],
  "category": "image",
  "urls": {
    "page": "https://gizza.ai/tools/image-perspective-warp/",
    "markdown": "https://gizza.ai/tools/image-perspective-warp/index.md",
    "descriptor": "https://gizza.ai/tools/image-perspective-warp/tool.json",
    "deep_link_example": "https://gizza.ai/tools/image-perspective-warp/?url=https://example.com/input&tl_x=0&tl_y=0&tr_x=W&tr_y=0&bl_x=0&bl_y=H&br_x=W&br_y=H&mode=correct&interpolation=linear"
  },
  "cli": "gizza tool image-perspective-warp 'url=https://example.com/input' 'tl_x=0' 'tl_y=0' 'tr_x=W' 'tr_y=0' 'bl_x=0' 'bl_y=H' 'br_x=W' 'br_y=H' 'mode=correct' 'interpolation=linear'",
  "tool": {
    "description": "Apply a free four-corner perspective transform to an image (keystone / skew correction, or deliberate perspective distortion). Provide either url (HTTP/HTTPS) or ref (id from a prior image tool call). Corners are pixel coordinates or W/H frame constants.",
    "parameters": {
      "additionalProperties": false,
      "oneOf": [
        {
          "required": [
            "url"
          ]
        },
        {
          "required": [
            "ref"
          ]
        }
      ],
      "properties": {
        "bl_x": {
          "default": "0",
          "description": "X of the bottom-left corner coordinate for ffmpeg perspective. Use a pixel number, or W/H for the image width/height edge. Default 0.",
          "type": "string"
        },
        "bl_y": {
          "default": "H",
          "description": "Y of the bottom-left corner coordinate for ffmpeg perspective. Use a pixel number, or W/H for the image width/height edge. Default H.",
          "type": "string"
        },
        "br_x": {
          "default": "W",
          "description": "X of the bottom-right corner coordinate for ffmpeg perspective. Use a pixel number, or W/H for the image width/height edge. Default W.",
          "type": "string"
        },
        "br_y": {
          "default": "H",
          "description": "Y of the bottom-right corner coordinate for ffmpeg perspective. Use a pixel number, or W/H for the image width/height edge. Default H.",
          "type": "string"
        },
        "interpolation": {
          "description": "Pixel interpolation: linear (faster) or cubic (smoother edges). Default: linear.",
          "enum": [
            "linear",
            "cubic"
          ],
          "type": "string"
        },
        "mode": {
          "description": "correct = the four corners mark a rectangle in the photo and are stretched to fill the frame (keystone/skew correction); distort = the image corners are pushed to the four points (add a tilt). Default: correct.",
          "enum": [
            "correct",
            "distort"
          ],
          "type": "string"
        },
        "ref": {
          "description": "Reference id from a prior tool call. Use either url or ref.",
          "type": "string"
        },
        "tl_x": {
          "default": "0",
          "description": "X of the top-left corner coordinate for ffmpeg perspective. Use a pixel number, or W/H for the image width/height edge. Default 0.",
          "type": "string"
        },
        "tl_y": {
          "default": "0",
          "description": "Y of the top-left corner coordinate for ffmpeg perspective. Use a pixel number, or W/H for the image width/height edge. Default 0.",
          "type": "string"
        },
        "tr_x": {
          "default": "W",
          "description": "X of the top-right corner coordinate for ffmpeg perspective. Use a pixel number, or W/H for the image width/height edge. Default W.",
          "type": "string"
        },
        "tr_y": {
          "default": "0",
          "description": "Y of the top-right corner coordinate for ffmpeg perspective. Use a pixel number, or W/H for the image width/height edge. Default 0.",
          "type": "string"
        },
        "url": {
          "description": "Image URL (HTTP/HTTPS). Use either url or ref.",
          "type": "string"
        }
      },
      "type": "object"
    }
  }
}