33#include "squish/squish_export.h"
41typedef unsigned char u8;
122SQUISH_EXPORT
void CompressMasked(
u8 const* rgba,
int mask,
void* block,
int flags,
float* metric = 0 );
163inline void Compress(
u8 const* rgba,
void* block,
int flags,
float* metric = 0 )
185SQUISH_EXPORT
void Decompress(
u8* rgba,
void const* block,
int flags );
258SQUISH_EXPORT
void CompressImage(
u8 const* rgba,
int width,
int height,
int pitch,
void* blocks,
int flags,
float* metric = 0 );
262SQUISH_EXPORT
void CompressImage(
u8 const* rgba,
int width,
int height,
void* blocks,
int flags,
float* metric = 0 );
286SQUISH_EXPORT
void DecompressImage(
u8* rgba,
int width,
int height,
int pitch,
void const* blocks,
int flags );
290SQUISH_EXPORT
void DecompressImage(
u8* rgba,
int width,
int height,
void const* blocks,
int flags );
314SQUISH_EXPORT
void ComputeMSE(
u8 const *rgba,
int width,
int height,
int pitch,
u8 const *dxt,
int flags,
double &colourMSE,
double &alphaMSE);
318SQUISH_EXPORT
void ComputeMSE(
u8 const *rgba,
int width,
int height,
u8 const *dxt,
int flags,
double &colourMSE,
double &alphaMSE);
All squish API functions live in this namespace.
Definition squish.h:36
void CompressImage(u8 const *rgba, int width, int height, int pitch, void *blocks, int flags, float *metric=0)
Compresses an image in memory.
void ComputeMSE(u8 const *rgba, int width, int height, int pitch, u8 const *dxt, int flags, double &colourMSE, double &alphaMSE)
Computes MSE of an compressed image in memory.
void Compress(u8 const *rgba, void *block, int flags, float *metric=0)
Compresses a 4x4 block of pixels.
Definition squish.h:163
int GetStorageRequirements(int width, int height, int flags)
Computes the amount of compressed storage required.
@ kBc5
Use BC5 compression.
Definition squish.h:60
@ kDxt1
Use DXT1 compression.
Definition squish.h:48
@ kDxt3
Use DXT3 compression.
Definition squish.h:51
@ kSourceBGRA
Source is BGRA rather than RGBA.
Definition squish.h:75
@ kWeightColourByAlpha
Weight the colour by alpha during cluster fit (disabled by default).
Definition squish.h:69
@ kColourClusterFit
Use a slow but high quality colour compressor (the default).
Definition squish.h:63
@ kColourRangeFit
Use a fast but low quality colour compressor.
Definition squish.h:66
@ kBc4
Use BC4 compression.
Definition squish.h:57
@ kDxt5
Use DXT5 compression.
Definition squish.h:54
@ kColourIterativeClusterFit
Use a very slow but very high quality colour compressor.
Definition squish.h:72
unsigned char u8
Typedef a quantity that is a single unsigned byte.
Definition squish.h:41
void DecompressImage(u8 *rgba, int width, int height, int pitch, void const *blocks, int flags)
Decompresses an image in memory.
void CompressMasked(u8 const *rgba, int mask, void *block, int flags, float *metric=0)
Compresses a 4x4 block of pixels.
void Decompress(u8 *rgba, void const *block, int flags)
Decompresses a 4x4 block of pixels.