MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / rawCompress

Function rawCompress

Engine/source/gfx/bitmap/imageUtils.cpp:89–102  ·  view source on GitHub ↗

compress raw pixel data, expects rgba format

Source from the content-addressed store, hash-verified

87
88 // compress raw pixel data, expects rgba format
89 bool rawCompress(const U8 *srcRGBA, U8 *dst, const S32 width, const S32 height, const GFXFormat compressFormat, const CompressQuality compressQuality)
90 {
91 if (!isCompressedFormat(compressFormat))
92 return false;
93
94 S32 squishFlags = _getSquishQuality(compressQuality);
95 S32 squishFormat = _getSquishFormat(compressFormat);
96
97 squishFlags |= squishFormat;
98
99 squish::CompressImage(srcRGBA, width,height,dst,squishFlags);
100
101 return true;
102 }
103
104 // compress DDSFile
105 bool ddsCompress(DDSFile *srcDDS, const GFXFormat compressFormat,const CompressQuality compressQuality)

Callers 2

executeMethod · 0.85
ddsCompressFunction · 0.85

Calls 4

isCompressedFormatFunction · 0.85
_getSquishQualityFunction · 0.85
_getSquishFormatFunction · 0.85
CompressImageFunction · 0.85

Tested by

no test coverage detected