UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FImageWrapperModule Class Reference
+ Inheritance diagram for FImageWrapperModule:

Public Member Functions

virtual TSharedPtr< IImageWrapperCreateImageWrapper (const EImageFormat InFormat, const TCHAR *InOptionalDebugImageName=nullptr) override
 
virtual EImageFormat DetectImageFormat (const void *CompressedData, int64 CompressedSize) override
 
virtual const TCHARGetExtension (EImageFormat Format) override
 
virtual EImageFormat GetImageFormatFromExtension (const TCHAR *Name) override
 
virtual ERawImageFormat::Type ConvertRGBFormat (ERGBFormat RGBFormat, int BitDepth, bool *bIsExactMatch) override
 
virtual void ConvertRawImageFormat (ERawImageFormat::Type RawFormat, ERGBFormat &OutFormat, int &OutBitDepth) override
 
virtual EImageFormat GetDefaultOutputFormat (ERawImageFormat::Type RawFormat) override
 
void StressDecompressImage (TSharedPtr< IImageWrapper > ImageWrapper, const void *InCompressedData, int64 InCompressedSize)
 
virtual bool DecompressImage (const void *InCompressedData, int64 InCompressedSize, FImage &OutImage) override
 
virtual bool DecompressImage (const void *InCompressedData, int64 InCompressedSize, FDecompressedImageOutput &OutDecompressedImage) override
 
virtual bool CompressImage (TArray64< uint8 > &OutData, EImageFormat ToFormat, const FImageView &InImage, int32 Quality) override
 
virtual void StartupModule () override
 
virtual void ShutdownModule () override
 
- Public Member Functions inherited from IImageWrapperModule
virtual ~IImageWrapperModule ()
 
- Public Member Functions inherited from IModuleInterface
virtual ~IModuleInterface ()
 
virtual void PreUnloadCallback ()
 
virtual void PostLoadCallback ()
 
virtual bool SupportsDynamicReloading ()
 
virtual bool SupportsAutomaticShutdown ()
 
virtual bool IsGameModule () const
 

Detailed Description

Image Wrapper module.

Member Function Documentation

◆ CompressImage()

virtual bool FImageWrapperModule::CompressImage ( TArray64< uint8 > &  OutData,
EImageFormat  ToFormat,
const FImageView InImage,
int32  Quality 
)
inlineoverridevirtual

Convert input FImage into a file-format encoded array. in ImageWrapper land, "Compress" means "put in file format" OutData is filled with the file format encoded data lossy conversion of the pixel type may be done if necessary eg. if you pass F32 float pixels to write to BMP, they will be converted to SRGB U8 BGRA8

Parameters
OutDataFilled with image-format data
ToFormatImage format to encode to
InImageImage to encode
Quality50-100 for JPEG, or EImageCompressionQuality

Implements IImageWrapperModule.

◆ ConvertRawImageFormat()

virtual void FImageWrapperModule::ConvertRawImageFormat ( ERawImageFormat::Type  RawFormat,
ERGBFormat OutFormat,
int &  OutBitDepth 
)
inlineoverridevirtual

Convert an FImage ERawImageFormat into an ImageWrapper style {ERGBFormat+BitDepth} mapping is always possible and requires no conversion

Implements IImageWrapperModule.

◆ ConvertRGBFormat()

virtual ERawImageFormat::Type FImageWrapperModule::ConvertRGBFormat ( ERGBFormat  RGBFormat,
int  BitDepth,
bool bIsExactMatch 
)
inlineoverridevirtual

Implements IImageWrapperModule.

◆ CreateImageWrapper()

virtual TSharedPtr< IImageWrapper > FImageWrapperModule::CreateImageWrapper ( const EImageFormat  InFormat,
const TCHAR InOptionalDebugImageName = nullptr 
)
inlineoverridevirtual

Create an IImageWrapper helper of a specific type

Parameters
InFormat- The type of image we want to deal with
InOptionalDebugImageName- An optional string to be displayed with any errors or warnings
Returns
The helper base class to manage the data EImageFormat is a compressor / file format, not a pixel format Deprecated. Prefer CompressImage/DecompressImage.

Implements IImageWrapperModule.

◆ DecompressImage() [1/2]

virtual bool FImageWrapperModule::DecompressImage ( const void InCompressedData,
int64  InCompressedSize,
FDecompressedImageOutput OutDecompressedImage 
)
inlineoverridevirtual

Implements IImageWrapperModule.

◆ DecompressImage() [2/2]

virtual bool FImageWrapperModule::DecompressImage ( const void InCompressedData,
int64  InCompressedSize,
FImage OutImage 
)
inlineoverridevirtual

Implements IImageWrapperModule.

◆ DetectImageFormat()

virtual EImageFormat FImageWrapperModule::DetectImageFormat ( const void InCompressedData,
int64  InCompressedSize 
)
inlineoverridevirtual

Detect image format by looking at the first few bytes of the compressed image data. You can call this method as soon as you have 8-16 bytes of compressed file content available.

Parameters
InCompressedDataThe raw image header.
InCompressedSizeThe size of InCompressedData.
Returns
the detected format or EImageFormat::Invalid if the method could not detect the image format.

Implements IImageWrapperModule.

◆ GetDefaultOutputFormat()

virtual EImageFormat FImageWrapperModule::GetDefaultOutputFormat ( ERawImageFormat::Type  RawFormat)
inlineoverridevirtual

Implements IImageWrapperModule.

◆ GetExtension()

virtual const TCHAR * FImageWrapperModule::GetExtension ( EImageFormat  Format)
inlineoverridevirtual

Implements IImageWrapperModule.

◆ GetImageFormatFromExtension()

virtual EImageFormat FImageWrapperModule::GetImageFormatFromExtension ( const TCHAR Name)
inlineoverridevirtual

Implements IImageWrapperModule.

◆ ShutdownModule()

virtual void FImageWrapperModule::ShutdownModule ( )
inlineoverridevirtual

Called before the module is unloaded, right before the module object is destroyed. During normal shutdown, this is called in reverse order that modules finish StartupModule(). This means that, as long as a module references dependent modules in it's StartupModule(), it can safely reference those dependencies in ShutdownModule() as well.

Reimplemented from IModuleInterface.

◆ StartupModule()

virtual void FImageWrapperModule::StartupModule ( )
inlineoverridevirtual

Called right after the module DLL has been loaded and the module object has been created Load dependent modules here, and they will be guaranteed to be available during ShutdownModule. ie:

FModuleManager::Get().LoadModuleChecked(TEXT("HTTP"));

Reimplemented from IModuleInterface.

◆ StressDecompressImage()

void FImageWrapperModule::StressDecompressImage ( TSharedPtr< IImageWrapper ImageWrapper,
const void InCompressedData,
int64  InCompressedSize 
)
inline

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