ITextureFormat::CompressImage

Compresses a single image.

Unreal Engine C++ API Reference > Developer > TextureFormat > Interfaces > ITextureFormat

References

   
Module TextureFormat
Header /Engine/Source/Developer/TextureFormat/Public/Interfaces/ITextureFormat.h
Include #include "Interfaces/ITextureFormat.h"
bool CompressImage
(
    const [FImage](API\Runtime\ImageCore\FImage) & Image,
    const [FTextureBuildSettings](API\Developer\TextureCompressor\FTextureBuildSettings) & BuildSettings,
    const FIntVector3 & InMip0Dimensions,
    int32 InMip0NumSlicesNoDepth,
    int32 InMipIndex,
    int32 InMipCount,
    FStringView DebugTexturePathName,
    bool bImageHasAlphaChannel,
    struct [FCompressedImage2D](API\Developer\TextureCompressor\FCompressedImage2D) & OutCompressedImage
) const

Remarks

Compresses a single image. true on success, false otherwise.

Parameters

Name Description
Image The input image. Image.RawData may be freed or modified by CompressImage; do not use after calling this.
BuildSettings Build settings.
InMip0Dimensions X/Y = Width/Height; Z = 1 unless volume texture, then its depth
InMip0NumSlicesNoDepth see FEncodedTextureDescription::NumSlices_NoDepth()
InMipIndex Mip index of current image in the overall texture.
InMipCount Total mips this texture will be created with.
DebugTexturePathName The path name of the texture we are building, for debug logging/filtering/dumping.
bImageHasAlphaChannel true if the image has a non-white alpha channel.
OutCompressedMip The compressed image.

Ask questions and help your peers Developer Forums

Write your own tutorials or read those from others Learning Library