UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
IImageWrapperModule.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreTypes.h"
8#include "ImageCore.h"
9#include "IImageWrapper.h"
11
12
13
14
49 : public IModuleInterface
50{
51public:
52
53
67 virtual bool CompressImage(TArray64<uint8> & OutData, EImageFormat ToFormat, const FImageView & InImage, int32 Quality = 0) = 0;
68
69 /* Read an image from file format encoded data.
70 * ImageWrapper calls this a "decompress"
71 * OutImage is allocated and filled, any existing contents are discarded
72 *
73 * @param InCompressedData Image format encoded bytes to read; format is automatically deduced from the content
74 * @param InCompressedSize Size of InCompressedData in bytes
75 * @param OutImage Filled with Image that is read. Allocated.
76 */
78
79 /* Read an image from file format encoded data.
80 * ImageWrapper calls this a "decompress"
81 * OutImage is allocated and filled, any existing contents are discarded
82 *
83 * @param InCompressedData Image format encoded bytes to read; format is automatically deduced from the content
84 * @param InCompressedSize Size of InCompressedData in bytes
85 * @param OutDecompressedImageData Filled with Image along with other meta data and mip images that is read. Allocated.
86 */
88
100
110
111 /* Name can be a full name like "xx.png" or just the extension part, like "png"
112 * returns EImageFormat::Invalid if no supported image extension found
113 */
115
116 /* returns extension, not including the "." , 3 or 4 chars */
117 virtual const TCHAR * GetExtension(EImageFormat Format) = 0;
118
119 /* get a good default output image format for a pixel format */
121
122 /* Convert an ImageWrapper style {ERGBFormat+BitDepth} into an ERawImageFormat for FImage
123 * returns ERawImageFormat::Invalid if no mapping is possible
124 * bIsExactMatch is filled with whether the formats are an exact match or not
125 * if not, conversion is needed
126 */
127 virtual ERawImageFormat::Type ConvertRGBFormat(ERGBFormat Format,int BitDepth,bool * bIsExactMatch = nullptr) = 0;
128
134
135public:
136
139};
FPlatformTypes::TCHAR TCHAR
Either ANSICHAR or WIDECHAR, depending on whether the platform supports wide characters or the requir...
Definition Platform.h:1135
FPlatformTypes::int64 int64
A 64-bit signed integer.
Definition Platform.h:1127
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
EImageFormat
Definition IImageWrapper.h:27
ERGBFormat
Definition IImageWrapper.h:76
Definition IImageWrapperModule.h:50
virtual void ConvertRawImageFormat(ERawImageFormat::Type RawFormat, ERGBFormat &OutFormat, int &OutBitDepth)=0
virtual EImageFormat GetDefaultOutputFormat(ERawImageFormat::Type RawFormat)=0
virtual bool DecompressImage(const void *InCompressedData, int64 InCompressedSize, FImage &OutImage)=0
virtual const TCHAR * GetExtension(EImageFormat Format)=0
virtual bool DecompressImage(const void *InCompressedData, int64 InCompressedSize, FDecompressedImageOutput &OutDecompressedImage)=0
virtual TSharedPtr< IImageWrapper > CreateImageWrapper(const EImageFormat InFormat, const TCHAR *InOptionalDebugImageName=nullptr)=0
virtual EImageFormat DetectImageFormat(const void *InCompressedData, int64 InCompressedSize)=0
virtual ~IImageWrapperModule()
Definition IImageWrapperModule.h:138
virtual bool CompressImage(TArray64< uint8 > &OutData, EImageFormat ToFormat, const FImageView &InImage, int32 Quality=0)=0
virtual EImageFormat GetImageFormatFromExtension(const TCHAR *Name)=0
virtual ERawImageFormat::Type ConvertRGBFormat(ERGBFormat Format, int BitDepth, bool *bIsExactMatch=nullptr)=0
Definition ModuleInterface.h:14
Definition SharedPointer.h:692
Type
Definition ImageCore.h:57
Definition ImageWrapperOutputTypes.h:11
Definition ImageCore.h:264
Definition ImageCore.h:416