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

#include <IcnsImageWrapper.h>

+ Inheritance diagram for FIcnsImageWrapper:

Public Member Functions

 FIcnsImageWrapper ()
 
virtual bool SetCompressed (const void *InCompressedData, int64 InCompressedSize) 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 void Compress (int32 Quality) 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 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 ()
 

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

ICNS implementation of the helper class.

Constructor & Destructor Documentation

◆ FIcnsImageWrapper()

FIcnsImageWrapper::FIcnsImageWrapper ( )

Default Constructor.

Member Function Documentation

◆ CanSetRawFormat()

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

CanSetRawFormat returns true if SetRaw will accept this format

Implements IImageWrapper.

◆ Compress()

void FIcnsImageWrapper::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 FIcnsImageWrapper::GetSupportedRawFormat ( const ERawImageFormat::Type  InFormat) const
overridevirtual

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

Implements IImageWrapper.

◆ SetCompressed()

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

◆ SetRaw()

bool FIcnsImageWrapper::SetRaw ( const void InRawData,
int64  InRawSize,
const int32  InWidth,
const int32  InHeight,
const ERGBFormat  InFormat,
const int32  InBitDepth,
const int32  InBytesPerRow = 0 
)
overridevirtual

Sets the raw image data. Prepares to call GetCompressed() next.

Parameters
InRawDataThe memory address of the start of the raw data.
InRawSizeThe size of the compressed data parsed.
InWidthThe width of the image data.
InHeightthe height of the image data.
InFormatthe format the raw data is in, normally RGBA.
InBitDepththe bit-depth per channel, normally 8.
InBytesPerRowthe number of bytes between rows, 0 = tightly packed rows with no padding.
Returns
true if data was the expected format.

you must not SetRaw() with a format unless it passes CanSetRawFormat() deprecated : avoid direct calls to SetRaw(), use ImageWrapperModule CompressImage instead do not use InBytesPerRow, it is ignored SetRaw does not take gamma information assumes U8 = SRGB and all else = Linear

Reimplemented from FImageWrapperBase.

◆ Uncompress()

void FIcnsImageWrapper::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: