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.

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback