Navigation
API > API/Runtime > API/Runtime/ImageWrapper > API/Runtime/ImageWrapper/IImageWrapperModule
Description
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
| Name | CompressImage |
| Type | function |
| Header File | /Engine/Source/Runtime/ImageWrapper/Public/IImageWrapperModule.h |
| Include Path | #include "IImageWrapperModule.h" |
bool CompressImage
(
TArray64< uint8 > & OutData,
EImageFormat ToFormat,
const FImageView & InImage,
int32 Quality
)
Parameters
| Name | Remarks |
|---|---|
| OutData | Filled with image-format data |
| ToFormat | Image format to encode to |
| InImage | Image to encode |
| Quality | 50-100 for JPEG, or EImageCompressionQuality |