📚Get Texture2D from Clipboard
📄 Description
Attempts to read image data from the system clipboard and create a new, transient UTexture2D from it.
World Context Object
Required for creating a new UObject. You can typically connect a self reference here.
Usage Details & Supported Formats
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.
Alpha Channel: 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 function will automatically force the alpha to be fully opaque (255) to ensure the image is visible.
Failure Conditions
The Return Value will be nullptr and Size will be (0, 0) if:
The clipboard is empty.
The clipboard contains data that is not a recognized image format (e.g., text, files).
Another application has locked the clipboard, preventing access.
The image data on the clipboard is corrupted or has invalid dimensions (0x0).
The engine fails to allocate memory for the new texture.
Last updated