# StudioScreenshotCapture

Roblox Engine API class from Roblox Studio 0.744.0.7441077 (version-7aaa6838d36c4448).

- Inherits from, nearest first: [Instance](https://rapi.sleaze.dev/classes/Instance.md), [Object](https://rapi.sleaze.dev/classes/Object.md)
- Tags: Not creatable, Not replicated
- Memory category: Instances
- HTML page: https://rapi.sleaze.dev/classes/StudioScreenshotCapture/
- Roblox documentation: https://create.roblox.com/docs/reference/engine/classes/StudioScreenshotCapture

Represents a single screenshot captured from Studio, exposing the resulting image buffer and the parameters the capture was taken with.

## Properties

### BufferFormat

```luau
StudioScreenshotCapture.BufferFormat: Enum.StudioCaptureScreenshotFormat = Enum.StudioCaptureScreenshotFormat.RGBA8
```

- Tags: Read only, Plugin security, Save only

The pixel format of the image data returned by [`GetBuffer()`](https://rapi.sleaze.dev/classes/StudioScreenshotCapture.md).

### BufferStatus

```luau
StudioScreenshotCapture.BufferStatus: Enum.StudioCaptureBufferStatus = Enum.StudioCaptureBufferStatus.NotStarted
```

- Tags: Read only, Plugin security, Save only

Reflects the current state of the capture as its image data is produced.

### OriginalSize

```luau
StudioScreenshotCapture.OriginalSize: Vector2 = Vector2.zero
```

- Tags: Read only, Plugin security, Save only

The size, in pixels, of the region available for capture from [`Position`](https://rapi.sleaze.dev/classes/StudioScreenshotCapture.md) to the edge of the Studio view.

### Position

```luau
StudioScreenshotCapture.Position: Vector2 = Vector2.zero
```

- Tags: Read only, Plugin security, Save only

The top-left corner, in pixels, of the captured region within the Studio view.

### Resolution

```luau
StudioScreenshotCapture.Resolution: Vector2 = Vector2.zero
```

- Tags: Read only, Plugin security, Save only

The pixel dimensions of the captured image.

### UICaptureMode

```luau
StudioScreenshotCapture.UICaptureMode: Enum.UICaptureMode = Enum.UICaptureMode.All
```

- Tags: Read only, Plugin security, Save only

Indicates which user-interface layers were included in the capture.

## Methods

### GetBuffer

```luau
StudioScreenshotCapture:GetBuffer(): buffer
```

- Tags: Plugin security

Returns the captured image data as a buffer in the capture's pixel format.

Returns: A buffer containing the captured image data in the capture's [`BufferFormat`](https://rapi.sleaze.dev/classes/StudioScreenshotCapture.md).

### GetErrors

```luau
StudioScreenshotCapture:GetErrors(): { any }
```

- Tags: Plugin security

Returns an array of error messages recorded during the capture.

Returns: An array of strings describing any errors that occurred during the capture.

### ScaleAsync

```luau
StudioScreenshotCapture:ScaleAsync(strategy: Enum.ResamplerMode, newSize: Vector2): StudioScreenshotCapture
```

- Tags: Yields, Plugin security

Produces a new capture containing a resized copy of this capture's image.

Parameters:

- `strategy`: The `ResamplerMode` used to resample the image. `ResamplerMode.Default` applies bilinear filtering; `ResamplerMode.Pixelated` applies nearest-neighbor (point) sampling.
- `newSize`: The width and height, in pixels, of the scaled image.

Returns: A new [`StudioScreenshotCapture`](https://rapi.sleaze.dev/classes/StudioScreenshotCapture.md) whose image is this capture scaled to `newSize`.

## Inherited members

- From [Instance](https://rapi.sleaze.dev/classes/Instance.md): `Archivable`, `archivable`, `Attributes`, `AttributesReplicate`, `AttributesSerialize`, `HistoryId`, `Name`, `Parent`, `PredictionMode`, `PropertyStatusStudio`, `RobloxLocked`, `SerializedOverrides`, `SourceAssetId`, `Tags`, `UniqueId`, `numExpectedDirectChildren`, `DataCost`, `Capabilities`, `DefinesCapabilities`, `IsInSandbox`, `Sandboxed`, `AddTag`, `ClearAllChildren`, `Clone`, `Destroy`, `FindFirstAncestor`, `FindFirstAncestorOfClass`, `FindFirstAncestorWhichIsA`, `FindFirstChild`, `FindFirstChildOfClass`, `FindFirstChildWhichIsA`, `FindFirstDescendant`, `GetActor`, `GetAttribute`, `GetAttributeChangedSignal`, `GetAttributes`, `GetChildren`, `GetDebugId`, `GetDescendants`, `GetFullName`, `GetStyled`, `GetStyledPropertyChangedSignal`, `GetTags`, `HasTag`, `IsAncestorOf`, `IsDescendantOf`, `IsPropertyModified`, `QueryDescendants`, `RemoveTag`, `ResetPropertyToDefault`, `SetAttribute`, `WaitForChild`, `Remove`, `children`, `clone`, `destroy`, `findFirstChild`, `getChildren`, `isDescendantOf`, `remove`, `AncestryChanged`, `AttributeChanged`, `ChildAdded`, `ChildRemoved`, `DescendantAdded`, `DescendantRemoving`, `Destroying`, `StyledPropertiesChanged`, `childAdded`
- From [Object](https://rapi.sleaze.dev/classes/Object.md): `ClassName`, `className`, `GetPropertyChangedSignal`, `IsA`, `isA`, `Changed`
