FImageUtils

Class of static image utility functions.

Windows
MacOS
Linux

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

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

References

Module

Engine

Header

Runtime/Engine/Public/ImageUtils.h

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