FImageUtils

Class of static image utility functions.

Windows
MacOS
Linux

References

Module

Engine

Header

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

Include

#include "ImageUtils.h"

Syntax

class FImageUtils

Remarks

Class of static image utility functions.

Functions

Name Description

Public function Static

void

 

CompressImageArray

(
    int32 ImageWidth,
    int32 ImageHeight,
    const TArray< FColor >& SrcData,
    TArray< uint8 >& DstData
)

Compress image to .png uint8 array.

Public function Static

UTexture2D &...

 

CreateCheckerboardTexture

(
    FColor ColorOne,
    FColor ColorTwo,
    int32 CheckerSize
)

Creates a new UTexture2D with a checkerboard pattern.

Public function Static

UTexture2D &...

 

CreateTexture2D

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

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

Public function Static

void

 

CropAndScaleImage

(
    int32 SrcWidth,
    int32 SrcHeight,
    int32 DesiredWidth,
    int32 DesiredHeight,
    const TArray< FColor >& SrcData,
    TArray< FColor >& DstData
)

Crops, and scales an image from a raw image array.

Public function Static

bool

 

ExportRenderTarget2DAsEXR

(
    UTextureRenderTarget2D* TexRT,
    FArchive& Ar
)

Public function Static

bool

 

ExportRenderTarget2DAsHDR

(
    UTextureRenderTarget2D* TexRT,
    FArchive& Ar
)

Exports a UTextureRenderTarget2D as an HDR image on the disk.

Public function Static

bool

 

ExportRenderTarget2DAsPNG

(
    UTextureRenderTarget2D* TexRT,
    FArchive& Ar
)

Exports a UTextureRenderTarget2D as an HDR image on the disk.

Public function Static

bool

 

ExportRenderTargetCubeAsHDR

(
    UTextureRenderTargetCube* TexR...,
    FArchive& Ar
)

Exports a UTextureRenderTargetCube as an HDR image on the disk.

Public function Static

bool

 

ExportTexture2DAsHDR

(
    UTexture2D* TexRT,
    FArchive& Ar
)

Exports a UTexture2D as an HDR image on the disk.

Public function Static

bool

 

ExportTextureCubeAsHDR

(
    UTextureCube* TexRT,
    FArchive& Ar
)

Exports a UTextureCube as an HDR image on the disk.

Public function Static

void

 

ImageResize

(
    int32 SrcWidth,
    int32 SrcHeight,
    const TArray< FColor >& SrcData,
    int32 DstWidth,
    int32 DstHeight,
    TArray< FColor >& DstData,
    bool bLinearSpace
)

Resizes the given image using a simple average filter and stores it in the destination array.

Public function Static

void

 

ImageResize

(
    int32 SrcWidth,
    int32 SrcHeight,
    const TArrayView< const FColor >& ...,
    int32 DstWidth,
    int32 DstHeight,
    const TArrayView< FColor >& DstDat...,
    bool bLinearSpace
)

Resizes the given image using a simple average filter and stores it in the destination array.

Public function Static

UTexture2D &...

 

ImportBufferAsTexture2D

(
    const TArray< uint8 >& Buffer
)

Imports a texture a buffer and creates Texture2D from it

Public function Static

UTexture2D &...

 

ImportFileAsTexture2D

(
    const FString& Filename
)

Imports a texture file from disk and creates Texture2D from it

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