![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <IImageWrapper.h>
Inheritance diagram for IImageWrapper:Public Types | |
| using | TStringMap = TMap< FString, FString > |
Static Public Member Functions | |
| 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 | |
| const TCHAR * | DebugImageName = nullptr |
Interface for image wrappers.
to Encode: SetRaw() then GetCompressed() to Decode : SetCompressed() then GetRaw()
in general, direct use of the IImageWrapper interface is now discouraged use ImageWrapperModule CompressImage/DecompressImage instead.
| using IImageWrapper::TStringMap = TMap<FString, FString> |
|
inlinevirtual |
Virtual destructor.
|
pure virtual |
Adds a key and value to this image's metadata. Will be saved in the image's header and restored when the image is loaded.
| InKey | Metadata consists of key value pairs. |
| InValue | Metadata consists of key value pairs. |
Implemented in FImageWrapperBase, and FHdrImageWrapper.
|
pure virtual |
CanSetRawFormat returns true if SetRaw will accept this format
Implemented in FBmpImageWrapper, FDdsImageWrapper, FIcnsImageWrapper, FIcoImageWrapper, FTgaImageWrapper, and FHdrImageWrapper.
|
static |
|
static |
Gets the bit depth of the image.
Beware several of the old wrappers (BMP,TGA) incorrectly used to return bits per color not per channel they now correctly return per-channel.
Implemented in FImageWrapperBase, and FHdrImageWrapper.
|
inline |
Gets the compressed data. (call SetRaw first) (Note: It may consume the data set in the SetCompressed function if it was set before)
Implemented in FImageWrapperBase, and FHdrImageWrapper.
Gets the data for export. Usually the same thing as GetCompressed.
|
pure virtual |
Gets the format of the image. Theoretically, this is the format it would be best to call GetRaw() with, if you support it.
Implemented in FImageWrapperBase, and FHdrImageWrapper.
Gets the height of the image.
Implemented in FImageWrapperBase, and FHdrImageWrapper.
|
pure virtual |
Copies this image's metadata to the caller's map.
| OutMetadata | A copy of this image's metadata. |
Implemented in FImageWrapperBase, and FHdrImageWrapper.
|
pure virtual |
Gets the raw data and meta info (Note: It may consume the data set in the SetRaw function if it was set before)
| InFormat | How we want to manipulate the RGB data. |
| InBitDepth | The output bit-depth per channel, normally 8. |
| OutRawData | Will contain the uncompressed raw data. |
| OutDecompressedImage | Will contain the mip images if available and other metadata. |
this is often broken, should only be used with InFormat == GetFormat() DEPRECATED , use GetRaw() with 2 argument or GetRawImage() meta info overload
Implemented in FImageWrapperBase, FHdrImageWrapper, and FHdrImageWrapper.
|
pure virtual |
Gets the raw data. (Note: It may consume the data set in the SetRaw function if it was set before)
| InFormat | How we want to manipulate the RGB data. |
| InBitDepth | The output bit-depth per channel, normally 8. |
| OutRawData | Will contain the uncompressed raw data. |
this is often broken, should only be used with InFormat == GetFormat() DEPRECATED , use GetRaw() with 1 argument or GetRawImage()
Implemented in FIcoImageWrapper, FImageWrapperBase, FHdrImageWrapper, and FHdrImageWrapper.
|
inline |
Gets the raw data in a TArray. Only use this if you're certain that the image is less than 2 GB in size. Prefer using the overload which takes a TArray64 in general. (Note: It may consume the data set in the SetRaw function if it was set before)
| InFormat | How we want to manipulate the RGB data. |
| InBitDepth | The output bit-depth per channel, normally 8. |
| OutRawData | Will contain the uncompressed raw data. |
this is often broken, should only be used with InFormat == GetFormat() DEPRECATED , use GetRaw() with 1 argument or GetRawImage()
|
inline |
Get the raw version of the image and write to the array view (Note: It may consume the data set in the SetRaw function if it was set before)
| InFormat | How we want to manipulate the RGB data. |
| InBitDepth | The output bit-depth per channel, normally 8. |
| OutRawData | Will contain the uncompressed raw data. |
this is often broken, should only be used with InFormat == GetFormat() DEPRECATED , use GetRaw() with 1 argument or GetRawImage()
|
inline |
GetRaw after SetCompressed fills the raw data in the native format/depth contained in the file along with meta info Do not use the GetRaw() variants that take format/depth arguments.
| OutRawData | Filled with raw image data. |
| OutDecompressedImage | Filled with mip images and other metadata. |
This GetRaw call replaces the variants with format/depth arguments, but prefer GetRawImage instead.
GetRaw after SetCompressed fills the raw data in the native format/depth contained in the file Do not use the GetRaw() variants that take format/depth arguments.
| OutRawData | Filled with raw image data. |
This GetRaw call replaces the variants with format/depth arguments, but prefer GetRawImage instead.
| bool IImageWrapper::GetRawImage | ( | FDecompressedImageOutput & | OutDecompressedImage | ) |
Decode the image file data from SetCompressed() into an FImage OutImage is allocated and attributes are filled. Any previous passed-in contents of OutImage are destroyed. OutImage.Format is ignored, a new format is set from the loaded image MetaInfo is filled if applicable
| OutDecompressedImage | Image and meta data along with Mip Map Images |
This is the recommended API to get the raw image data from the imagewrapper. Prefer this instead of any of the GetRaw() calls.
Decode the image file data from SetCompressed() into an FImage OutImage is allocated and attributes are filled Any previous passed-in contents of OutImage are destroyed OutImage.Format is ignored, a new format is set from the loaded image
| OutImage | Filled with the image |
This is the recommended API to get the raw image data from the imagewrapper. Prefer this instead of any of the GetRaw() calls.
|
static |
|
inline |
|
pure virtual |
returns InFormat if supported, else maps to something supported the returned format will pass CanSetRawFormat()
Implemented in FBmpImageWrapper, FDdsImageWrapper, FIcnsImageWrapper, FIcoImageWrapper, FTgaImageWrapper, and FHdrImageWrapper.
Gets the width of the image.
Implemented in FImageWrapperBase, and FHdrImageWrapper.
|
pure virtual |
Sets the compressed data. Can then call GetRaw().
| InCompressedData | The memory address of the start of the compressed data. |
| InCompressedSize | The size of the compressed data parsed. |
after SetCompressed, image info queries like GetWidth and GetBitDepth are allowed call GetRaw to get the decoded bits decompression is not done until GetRaw
Implemented in FBmpImageWrapper, FDdsImageWrapper, FIcnsImageWrapper, FIcoImageWrapper, FTgaImageWrapper, FImageWrapperBase, and FHdrImageWrapper.
|
pure virtual |
Sets the raw image data. Prepares to call GetCompressed() next.
| InRawData | The memory address of the start of the raw data. |
| InRawSize | The size of the compressed data parsed. |
| InWidth | The width of the image data. |
| InHeight | the height of the image data. |
| InFormat | the format the raw data is in, normally RGBA. |
| InBitDepth | the bit-depth per channel, normally 8. |
| InBytesPerRow | the number of bytes between rows, 0 = tightly packed rows with no padding. |
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
Implemented in FHdrImageWrapper, FIcnsImageWrapper, and FImageWrapperBase.
Does this image type support embedded metadata in its header?
PNG is an example of an image type which supports adding user-defined metadata to its header.
Implemented in FImageWrapperBase, and FHdrImageWrapper.
|
protected |