Navigation
API > API/Runtime > API/Runtime/ImageWrapper
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.
| Name | IImageWrapper |
| Type | class |
| Header File | /Engine/Source/Runtime/ImageWrapper/Public/IImageWrapper.h |
| Include Path | #include "IImageWrapper.h" |
Syntax
class IImageWrapper
Derived Classes
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~IImageWrapper() |
Virtual destructor. | IImageWrapper.h |
Typedefs
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddMetadata
(
const FString& InKey, |
Adds a key and value to this image's metadata. | IImageWrapper.h | |
bool CanSetRawFormat
(
const ERGBFormat InFormat, |
CanSetRawFormat returns true if SetRaw will accept this format | IImageWrapper.h | |
int32 GetBitDepth () |
Gets the bit depth of the image. | IImageWrapper.h | |
ERawImageFormat::Type GetClosestRawImageFormat
(
bool* bIsExactMatch |
Get the current image format, mapped to an ERawImageFormat if ! *bIsExactMatch , conversion is needed can call after SetCompressed() | IImageWrapper.h | |
TArray64< uint8 > GetCompressed
(
int32 Quality |
Gets the compressed data. | IImageWrapper.h | |
virtual TArray64< uint8 > GetExportData
(
int32 Quality |
Gets the data for export. Usually the same thing as GetCompressed. | IImageWrapper.h | |
| Gets the format of the image. | IImageWrapper.h | ||
int64 GetHeight () |
Gets the height of the image. | IImageWrapper.h | |
void GetMetadata
(
TStringMap& OutMetadata |
Copies this image's metadata to the caller's map. | IImageWrapper.h | |
bool GetRaw
(
const ERGBFormat InFormat, |
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) | IImageWrapper.h | |
bool GetRaw
(
const ERGBFormat InFormat, |
Gets the raw data in a TArray. | IImageWrapper.h | |
bool GetRaw
(
const ERGBFormat InFormat, |
Gets the raw data and meta info (Note: It may consume the data set in the SetRaw function if it was set before) | IImageWrapper.h | |
bool GetRaw
(
const ERGBFormat InFormat, |
Gets the raw data. | IImageWrapper.h | |
bool GetRaw
(
FDecompressedImageOutput& OutDecompressedImage |
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. | IImageWrapper.h | |
bool GetRaw
(
TArray64< uint8 >& OutRawData |
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. | IImageWrapper.h | |
bool GetRawImage
(
FDecompressedImageOutput& OutDecompressedImage |
Decode the image file data from SetCompressed() into an FImage OutImage is allocated and attributes are filled. | IImageWrapper.h | |
bool GetRawImage
(
FImage& OutImage |
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 | IImageWrapper.h | |
bool GetSRGB () |
Should the pixels be treated as sRGB encoded? (or Linear) | IImageWrapper.h | |
ERawImageFormat::Type GetSupportedRawFormat
(
const ERawImageFormat::Type InFormat |
Returns InFormat if supported, else maps to something supported the returned format will pass CanSetRawFormat() | IImageWrapper.h | |
int64 GetWidth () |
Gets the width of the image. | IImageWrapper.h | |
bool SetCompressed
(
const void* InCompressedData, |
Sets the compressed data. | IImageWrapper.h | |
void SetDebugImageName
(
const TCHAR* InDebugImageName |
Set the debug image name | IImageWrapper.h | |
bool SetRaw
(
const void* InRawData, |
Sets the raw image data. | IImageWrapper.h | |
bool SupportsMetadata () |
Does this image type support embedded metadata in its header? | IImageWrapper.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void ConvertRawImageFormat
(
ERawImageFormat::Type RawFormat, |
External users call these from ImageWrapperModule.h , see documentation there | IImageWrapper.h | |
static ERawImageFormat::Type ConvertRGBFormat
(
ERGBFormat RGBFormat, |
IImageWrapper.h | ||
static int64 GetRGBFormatBytesPerPel
(
ERGBFormat RGBFormat, |
IImageWrapper.h |