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

#include <DdsImageWrapper.h>

+ Inheritance diagram for FDdsImageWrapper:

Public Member Functions

 FDdsImageWrapper ()
 
 ~FDdsImageWrapper ()
 
void FreeDDS ()
 
virtual void Reset () override
 
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)
 
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 ()
 

Public Attributes

UE::DDS::FDDSFileDDS = nullptr
 

Additional Inherited Members

- Public Types inherited from IImageWrapper
using TStringMap = TMap< FString, FString >
 
- 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)
 
- 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

DDS implementation of the helper class

Constructor & Destructor Documentation

◆ FDdsImageWrapper()

FDdsImageWrapper::FDdsImageWrapper ( )
inline

◆ ~FDdsImageWrapper()

FDdsImageWrapper::~FDdsImageWrapper ( )
inline

Member Function Documentation

◆ CanSetRawFormat()

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

CanSetRawFormat returns true if SetRaw will accept this format

Implements IImageWrapper.

◆ Compress()

void FDdsImageWrapper::Compress ( int32  Quality)
overridevirtual

Compresses the data.

Parameters
QualityThe compression quality.

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

Implements FImageWrapperBase.

◆ FreeDDS()

void FDdsImageWrapper::FreeDDS ( )
inline

◆ GetSupportedRawFormat()

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

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

Implements IImageWrapper.

◆ Reset()

void FDdsImageWrapper::Reset ( )
overridevirtual

Resets the local variables.

Reimplemented from FImageWrapperBase.

◆ SetCompressed()

bool FDdsImageWrapper::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 FDdsImageWrapper::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.

Member Data Documentation

◆ DDS

UE::DDS::FDDSFile* FDdsImageWrapper::DDS = nullptr

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