![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <IImageWrapperModule.h>
Inheritance diagram for IImageWrapperModule:Interface for image wrapper modules.
DO NOT WRITE CODE THAT USES IMAPE WRAPPERS DIRECTLY.
If you have "Engine" module, then just use FImageUtils::CompressImage/DecompressImage The easiest way to load/save an image is FImageUtils::LoadImage/SaveImageByExtension
If you don't have "Engine" module, then use IImageWrapperModule::CompressImage/DecompressImage Do not manually create individual image wrappers.
NOTE: Please prefer to work with images through ImageCore FImage/FImageView (not TextureSource/TextureSourceFormat or raw arrays of bytes) again, do not manually use ERGBFormat and arrays of bytes to work with ImageWrappers instead use the FImage-oriented APIs which will handle all format conversions for you.
You do NOT need to convert formats before saving an image, the FImage APIs will do it for you.
If you got an image from a render target, it may have a zero alpha channel. You might want to do FImageCore::SetAlphaOpaque before saving.
note on SRGB/Gamma handling : it is assumed that non-U8 data is always Linear U8 data is written without changing the bytes the gamma correction of U8 bytes is NOT persisted in the file formats (for read or write) loading will always give you SRGB for U8 (ERawImageFormat::GetDefaultGammaSpace) if U8-float conversions are required, they do respect gamma space
eg. if you write U8 Linear data to EXR, it will be converted to Linear float from U8 Linear correctly if you write U8 Linear to BMP , it will write the U8 bytes unchanged, and on load it will come back in as U8 SRGB
|
inlinevirtual |
Virtual destructor.
|
pure virtual |
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
| OutData | Filled with image-format data |
| ToFormat | Image format to encode to |
| InImage | Image to encode |
| Quality | 50-100 for JPEG, or EImageCompressionQuality |
Implemented in FImageWrapperModule.
|
pure virtual |
Convert an FImage ERawImageFormat into an ImageWrapper style {ERGBFormat+BitDepth} mapping is always possible and requires no conversion
Implemented in FImageWrapperModule.
|
pure virtual |
Implemented in FImageWrapperModule.
|
pure virtual |
Create an IImageWrapper helper of a specific type
| InFormat | - The type of image we want to deal with |
| InOptionalDebugImageName | - An optional string to be displayed with any errors or warnings |
Implemented in FImageWrapperModule.
|
pure virtual |
Implemented in FImageWrapperModule.
|
pure virtual |
Implemented in FImageWrapperModule.
|
pure virtual |
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.
| InCompressedData | The raw image header. |
| InCompressedSize | The size of InCompressedData. |
Implemented in FImageWrapperModule.
|
pure virtual |
Implemented in FImageWrapperModule.
|
pure virtual |
Implemented in FImageWrapperModule.
|
pure virtual |
Implemented in FImageWrapperModule.