Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/FImageUtils
Description
"Compress" an image to a file format. Here "Compress" really means put an image into file format binary. Extension is used to identify file format, eg. png/jpeg/etc. FImageView can be made from any surface pointer.
| Name | CompressImage |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Public/ImageUtils.h |
| Include Path | #include "ImageUtils.h" |
| Source | /Engine/Source/Runtime/Engine/Private/ImageUtils.cpp |
static bool CompressImage
(
TArray64< uint8 > & OutData,
const TCHAR * ToFormatExtension,
const FImageView & InImage,
int32 Quality
)
Parameters
| Name | Remarks |
|---|---|
| OutData | Filled with file format Image data |
| ToFormatExtension | can be a full name like "xxx.png" or just the extension like "png" ToFormatExtension == null is okay & means use default output format |
| InImage | Image to save |
| Quality | Mainly for JPEG, but special values have some meaning for other formats |