📚Get Texture2D from Clipboard

📄 Description

Attempts to read image data from the system clipboard and create a new, transient UTexture2D from it.

Name
Description

Size

The width (X) and height (Y) of the created texture. This will be (0, 0) if the operation fails.

Return Value

The newly created texture. This will be null if the operation fails (Empty clipboard, unrecognized type in clipboard like text or file, locked access to clipboard due to another application blocking it, corrupted image data, invalid image dimensions, not enough memory).

This node reads common bitmap formats from the clipboard (CF_DIBV5, CF_DIB, CF_BITMAP). This means it works with images copied from most standard applications like MS Paint, Photoshop, GIMP, Snipping Tool, and web browsers.

The created texture is transient, meaning it exists only in memory and will be garbage collected if not referenced. You are responsible for managing its lifecycle (e.g., assigning it to a material instance, saving it, etc.).

The texture is created with the PF_B8G8R8A8 pixel format.

If an image is copied from a source that does not provide an explicit alpha channel (or provides an all-zero alpha channel, common in browsers), this node will automatically force the alpha to be fully opaque (255) to ensure the image is visible.

Last updated