Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/FImageUtils
Description
Creates a 2D texture from a array of raw color data.
this fills a TextureSource , and will then Build a Platform texture from that can be used WITH_EDITOR only contrast to CreateTexture2DFromImage
Prefer the more modern CreateTexture from FImage.
Creates a 2D texture from a array of raw color data.
| Name | CreateTexture2D |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Public/ImageUtils.h |
| Include Path | #include "ImageUtils.h" |
| Source | /Engine/Source/Runtime/Engine/Private/ImageUtils.cpp |
static UTexture2D * CreateTexture2D
(
int32 SrcWidth,
int32 SrcHeight,
const TArray < FColor > & SrcData,
UObject * Outer,
const FString & Name,
const EObjectFlags & Flags,
const FCreateTexture2DParameters & InParams
)
Returns a pointer to the constructed 2D texture object.
Parameters
| Name | Remarks |
|---|---|
| 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. |
| 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. |