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

#include <IcoImageWrapper.h>

+ Inheritance diagram for FIcoImageWrapper:

Public Member Functions

 FIcoImageWrapper ()
 
virtual void Compress (int32 Quality) override
 
virtual void Uncompress (const ERGBFormat InFormat, int32 InBitDepth) override
 
virtual bool SetCompressed (const void *InCompressedData, int64 InCompressedSize) override
 
virtual bool GetRaw (const ERGBFormat InFormat, int32 InBitDepth, TArray64< uint8 > &OutRawData) 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, 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 ()
 

Protected Member Functions

bool LoadICOHeader ()
 
- Protected Member Functions inherited from FImageWrapperBase
int64 GetBytesPerPel () const
 
int64 GetBytesPerRow () const
 
bool GetImageViewOfSetRawForCompress (FImageView &OutImage) const
 

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 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

ICO implementation of the helper class.

Constructor & Destructor Documentation

◆ FIcoImageWrapper()

FIcoImageWrapper::FIcoImageWrapper ( )

Default Constructor.

Member Function Documentation

◆ CanSetRawFormat()

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

CanSetRawFormat returns true if SetRaw will accept this format

Implements IImageWrapper.

◆ Compress()

void FIcoImageWrapper::Compress ( int32  Quality)
overridevirtual

Compresses the data.

Parameters
QualityThe compression quality.

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

Implements FImageWrapperBase.

◆ GetRaw()

bool FIcoImageWrapper::GetRaw ( const ERGBFormat  InFormat,
int32  InBitDepth,
TArray64< uint8 > &  OutRawData 
)
overridevirtual

Gets the raw data. (Note: It may consume the data set in the SetRaw function if it was set before)

Parameters
InFormatHow we want to manipulate the RGB data.
InBitDepthThe output bit-depth per channel, normally 8.
OutRawDataWill contain the uncompressed raw data.
Returns
true on success, false otherwise.

this is often broken, should only be used with InFormat == GetFormat() DEPRECATED , use GetRaw() with 1 argument or GetRawImage()

Reimplemented from FImageWrapperBase.

◆ GetSupportedRawFormat()

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

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

Implements IImageWrapper.

◆ LoadICOHeader()

bool FIcoImageWrapper::LoadICOHeader ( )
protected

Load the header information.

Returns
true if successful

◆ SetCompressed()

bool FIcoImageWrapper::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 FIcoImageWrapper::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: