FImageUtils::CreateTexture2D

Creates a 2D texture from a array of raw color data.

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Public/ImageUtils.h

Include

#include "ImageUtils.h"

Source

/Engine/Source/Runtime/Engine/Private/ImageUtils.cpp

Syntax

static UTexture2D * CreateTexture2D
(
    int32 SrcWidth,
    int32 SrcHeight,
    const TArray< FColor > & SrcData,
    UObject * Outer,
    const FString & Name,
    const EObjectFlags & Flags,
    const FCreateTexture2DParameters & InParams
)

Remarks

Creates a 2D texture from a array of raw color data.

Returns

Returns a pointer to the constructed 2D texture object.

Parameters

Parameter

Description

SrcWidth

Source image width.

SrcHeight

Source image height.

SrcData

Source image data.

Outer

Outer for the texture object.

Name

Name for the texture object.

Flags

Object flags for the texture object.

InParams

Params about how to set up the texture.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss