UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FTgaImageWrapper Class Reference

#include <TgaImageWrapper.h>

+ Inheritance diagram for FTgaImageWrapper:

Public Member Functions

bool LoadTGAHeader ()
 
virtual void Compress (int32 Quality) override
 
virtual bool SetCompressed (const void *InCompressedData, int64 InCompressedSize) override
 
virtual void Uncompress (const ERGBFormat InFormat, int32 InBitDepth) override
 
virtual bool CanSetRawFormat (const ERGBFormat InFormat, const int32 InBitDepth) const override
 
virtual ERawImageFormat::Type GetSupportedRawFormat (const ERawImageFormat::Type InFormat) const override
 
- Public Member Functions inherited from FImageWrapperBase
 FImageWrapperBase ()
 
const TArray64< uint8 > & GetRawData () const
 
void MoveRawData (TArray64< uint8 > &OutRawData)
 
virtual void Reset ()
 
void SetError (const TCHAR *ErrorMessage)
 
const FString & GetLastError () const
 
virtual void Uncompress (const ERGBFormat InFormat, int32 InBitDepth, FDecompressedImageOutput &OutDecompressedImage)
 
virtual TArray64< uint8GetCompressed (int32 Quality=0) override
 
virtual int32 GetBitDepth () const override
 
virtual ERGBFormat GetFormat () const override
 
virtual int64 GetHeight () const override
 
virtual bool GetRaw (const ERGBFormat InFormat, int32 InBitDepth, TArray64< uint8 > &OutRawData) override
 
virtual bool GetRaw (const ERGBFormat InFormat, int32 InBitDepth, FDecompressedImageOutput &OutDecompressedImage) override
 
virtual int64 GetWidth () const override
 
virtual bool SetRaw (const void *InRawData, int64 InRawSize, const int32 InWidth, const int32 InHeight, const ERGBFormat InFormat, const int32 InBitDepth, const int32 InBytesPerRow=0) override
 
virtual bool SupportsMetadata () const override
 
virtual void AddMetadata (const FString &InKey, const FString &InValue) override
 
virtual void GetMetadata (TStringMap &OutMetadata) const override
 
- Public Member Functions inherited from IImageWrapper
virtual TArray64< uint8GetExportData (int32 Quality=0)
 
bool GetRaw (TArray64< uint8 > &OutRawData)
 
bool GetRaw (FDecompressedImageOutput &OutDecompressedImage)
 
bool GetRawImage (FImage &OutImage)
 
bool GetRawImage (FDecompressedImageOutput &OutDecompressedImage)
 
bool GetRaw (const ERGBFormat InFormat, int32 InBitDepth, TArray< uint8 > &OutRawData)
 
bool GetRaw (const ERGBFormat InFormat, int32 InBitDepth, TArrayView64< uint8 > OutRawData)
 
bool GetSRGB () const
 
ERawImageFormat::Type GetClosestRawImageFormat (bool *bIsExactMatch=nullptr) const
 
void SetDebugImageName (const TCHAR *InDebugImageName)
 
virtual ~IImageWrapper ()
 

Static Public Member Functions

static bool IsTGAHeader (const void *CompressedData, int64 CompressedDataLength)
 
- Static Public Member Functions inherited from IImageWrapper
static IMAGEWRAPPER_API void ConvertRawImageFormat (ERawImageFormat::Type RawFormat, ERGBFormat &OutFormat, int &OutBitDepth)
 
static IMAGEWRAPPER_API ERawImageFormat::Type ConvertRGBFormat (ERGBFormat RGBFormat, int BitDepth, bool *bIsExactMatch=nullptr)
 
static IMAGEWRAPPER_API int64 GetRGBFormatBytesPerPel (ERGBFormat RGBFormat, int BitDepth)
 

Additional Inherited Members

- Public Types inherited from IImageWrapper
using TStringMap = TMap< FString, FString >
 
- Protected Member Functions inherited from FImageWrapperBase
int64 GetBytesPerPel () const
 
int64 GetBytesPerRow () const
 
bool GetImageViewOfSetRawForCompress (FImageView &OutImage) const
 
- Protected Attributes inherited from FImageWrapperBase
TArray64< uint8RawData
 
TArray64< uint8CompressedData
 
ERGBFormat Format
 
int BitDepth
 
int64 Width
 
int64 Height
 
FString LastError
 
- Protected Attributes inherited from IImageWrapper
const TCHARDebugImageName = nullptr
 

Detailed Description

TGA implementation of the helper class

Member Function Documentation

◆ CanSetRawFormat()

bool FTgaImageWrapper::CanSetRawFormat ( const ERGBFormat  InFormat,
const int32  InBitDepth 
) const
overridevirtual

CanSetRawFormat returns true if SetRaw will accept this format

Implements IImageWrapper.

◆ Compress()

void FTgaImageWrapper::Compress ( int32  Quality)
overridevirtual

Compresses the data.

Parameters
QualityThe compression quality.

returns void. call SetError() in your implementation if you fail.

Implements FImageWrapperBase.

◆ GetSupportedRawFormat()

ERawImageFormat::Type FTgaImageWrapper::GetSupportedRawFormat ( const ERawImageFormat::Type  InFormat) const
overridevirtual

returns InFormat if supported, else maps to something supported the returned format will pass CanSetRawFormat()

Implements IImageWrapper.

◆ IsTGAHeader()

bool FTgaImageWrapper::IsTGAHeader ( const void CompressedData,
int64  CompressedDataLength 
)
static

◆ LoadTGAHeader()

bool FTgaImageWrapper::LoadTGAHeader ( )

Load the header information, returns true if successful.

◆ SetCompressed()

bool FTgaImageWrapper::SetCompressed ( const void InCompressedData,
int64  InCompressedSize 
)
overridevirtual

Sets the compressed data. Can then call GetRaw().

Parameters
InCompressedDataThe memory address of the start of the compressed data.
InCompressedSizeThe size of the compressed data parsed.
Returns
true if data was the expected format.

after SetCompressed, image info queries like GetWidth and GetBitDepth are allowed call GetRaw to get the decoded bits decompression is not done until GetRaw

Reimplemented from FImageWrapperBase.

◆ Uncompress()

void FTgaImageWrapper::Uncompress ( const ERGBFormat  InFormat,
int32  InBitDepth 
)
overridevirtual

Function to uncompress our data

Parameters
InFormatHow we want to manipulate the RGB data
InBitDepthThe bit depth per-channel of the image.

returns void. call SetError() in your implementation if you fail.

Implements FImageWrapperBase.


The documentation for this class was generated from the following files: