{
  "classes": [
    {
      "constants": [],
      "types": [],
      "name": "@eryx/image",
      "tags": [],
      "functions": [
        {
          "source": {
            "path": "",
            "line": 48
          },
          "is_method": false,
          "signature": "image.open(path: string) → Image",
          "owner": "image",
          "desc": "Open an image from the filesystem. The format is inferred from the filename.\n\nSupported formats: JPEG, PNG, TGA, BMP, PSD, GIF, HDR, PIC, PNM",
          "tags": [],
          "name": "open",
          "return_str": "Image",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "Image",
              "desc": ""
            }
          ],
          "params": [
            {
              "lua_type": "string",
              "name": "path",
              "desc": ""
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 57
          },
          "is_method": false,
          "signature": "image.fromRGBABuffer(\n    pixelData: buffer,  -- The buffer containing raw pixel data in RGBA format\n    width: number,  -- The width of the image in pixels\n    height: number,  -- The height of the image in pixels\n    channels: number  -- The number of bytes per pixel. The only legal value for this parameter is `4`\n) → Image",
          "owner": "image",
          "desc": "Load an image from a buffer.",
          "tags": [],
          "name": "fromRGBABuffer",
          "return_str": "Image",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "Image",
              "desc": ""
            }
          ],
          "params": [
            {
              "lua_type": "buffer",
              "name": "pixelData",
              "desc": "The buffer containing raw pixel data in RGBA format"
            },
            {
              "lua_type": "number",
              "name": "width",
              "desc": "The width of the image in pixels"
            },
            {
              "lua_type": "number",
              "name": "height",
              "desc": "The height of the image in pixels"
            },
            {
              "lua_type": "number",
              "name": "channels",
              "desc": "The number of bytes per pixel. The only legal value for this parameter is `4`"
            }
          ]
        }
      ],
      "properties": [],
      "source": {
        "path": "",
        "line": 0
      },
      "desc": "Basic operations for reading and writing images.\n"
    },
    {
      "is_primary_export": false,
      "source": {
        "path": "",
        "line": 7
      },
      "tags": [],
      "properties": [
        {
          "tags": [],
          "lua_type": "width: number",
          "name": "width",
          "desc": "The width of the image, in pixels"
        },
        {
          "tags": [],
          "lua_type": "height: number",
          "name": "height",
          "desc": "The height of the image, in pixels"
        },
        {
          "tags": [],
          "lua_type": "channels: number",
          "name": "channels",
          "desc": "The number of bytes each pixel uses.\nAll images are currently loaded in 4-channel RGBA mode."
        },
        {
          "tags": [],
          "lua_type": "pixelBuffer: buffer",
          "name": "pixelBuffer",
          "desc": "The raw buffer of pixel data, arranged in row-major order"
        }
      ],
      "desc": "",
      "name": "Image",
      "functions": [
        {
          "source": {
            "path": "",
            "line": 22
          },
          "is_method": true,
          "signature": "Image:getPixel(\n    x: number,  -- The x coordinate. 0-indexed\n    y: number  -- The y coordinate. 0-indexed\n) → (\n      -- Tuple of `{R, G, B, A}`, all in range 0-255\n)",
          "desc": "Read a single pixel from an image",
          "tags": [],
          "name": "getPixel",
          "return_str": "{ number }",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "{ number }",
              "desc": "Tuple of `{R, G, B, A}`, all in range 0-255"
            }
          ],
          "params": [
            {
              "lua_type": "number",
              "name": "x",
              "desc": "The x coordinate. 0-indexed"
            },
            {
              "lua_type": "number",
              "name": "y",
              "desc": "The y coordinate. 0-indexed"
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 28
          },
          "is_method": true,
          "signature": "Image:setPixel(\n    x: number,  -- The x coordinate. 0-indexed\n    y: number,  -- The y coordinate. 0-indexed\n    rgba: { number }  -- Tuple of `{R, G, B, A}`, all in range 0-255\n) → ()",
          "desc": "Write a single pixel to an image",
          "tags": [],
          "name": "setPixel",
          "return_str": "()",
          "function_type": "Method",
          "returns": [],
          "params": [
            {
              "lua_type": "number",
              "name": "x",
              "desc": "The x coordinate. 0-indexed"
            },
            {
              "lua_type": "number",
              "name": "y",
              "desc": "The y coordinate. 0-indexed"
            },
            {
              "lua_type": "{ number }",
              "name": "rgba",
              "desc": "Tuple of `{R, G, B, A}`, all in range 0-255"
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 37
          },
          "is_method": true,
          "signature": "Image:save(path: string, quality: number?) → ()",
          "desc": "Save this image to a file. The format is inferred from the filename.\n\nSupported formats:\n- PNG: `.png`\n- JPEG: `.jpg`/`.jpeg`\n- BMP: `.bmp`\n- TGA: `.tga`",
          "tags": [],
          "name": "save",
          "return_str": "()",
          "function_type": "Method",
          "returns": [],
          "params": [
            {
              "lua_type": "string",
              "name": "path",
              "desc": ""
            },
            {
              "lua_type": "number?",
              "name": "quality",
              "desc": ""
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 42
          },
          "is_method": true,
          "signature": "Image:resize(width: number, height: number) → Image",
          "desc": "Resize an image.\n\nDownsampling an image uses the Mitchell filter, upsampling uses cubic interpolation.",
          "tags": [],
          "name": "resize",
          "return_str": "Image",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "Image",
              "desc": ""
            }
          ],
          "params": [
            {
              "lua_type": "number",
              "name": "width",
              "desc": ""
            },
            {
              "lua_type": "number",
              "name": "height",
              "desc": ""
            }
          ]
        }
      ],
      "metamethods": [],
      "types": []
    }
  ]
}