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