Garry's Mod Wiki

RenderCaptureData

Description

Used for render.Capture.

Members

string format
Format of the capture. Valid formats are:

  • jpeg or jpg
  • png

As of version 2026.06.19:

  • rgba, rgb and bgra - Raw image data in given byte order.
    Expected data size is ImgWidth * ImgHeight * 4 (ImgWidth * ImgHeight * 3 for rgb)
    Each 4 (or 3 for rgb) bytes is one pixel, top to bottom left to right.
number x
X coordinate of the capture origin
number y
Y coordinate of the capture origin
number w
Width of the capture
number h
Height of the capture
number quality
The quality of the capture. Affects jpeg only.
boolean alpha
Set to false to capture an image with alpha channel set to fully opaque. Affects any format with alpha channel support, so not jpg.

Default: true