nvidia-texture-tools/src/nvimage/Quantize.h

33 lines
733 B
C
Raw Normal View History

2007-04-17 08:49:19 +00:00
// This code is in the public domain -- castanyo@yahoo.es
2010-07-13 03:08:45 +00:00
#pragma once
2007-04-17 08:49:19 +00:00
#ifndef NV_IMAGE_QUANTIZE_H
#define NV_IMAGE_QUANTIZE_H
2010-07-13 03:08:45 +00:00
#include "nvimage.h"
2008-10-15 07:16:57 +00:00
2007-04-17 08:49:19 +00:00
namespace nv
{
class Image;
namespace Quantize
{
void RGB16(Image * img);
void BinaryAlpha(Image * img, int alpha_threshold = 127);
void Alpha4(Image * img);
void FloydSteinberg_RGB16(Image * img);
void FloydSteinberg_BinaryAlpha(Image * img, int alpha_threshold = 127);
void FloydSteinberg_Alpha4(Image * img);
2008-10-15 07:16:57 +00:00
void Truncate(Image * image, uint rsize, uint gsize, uint bsize, uint asize);
void FloydSteinberg(Image * image, uint rsize, uint gsize, uint bsize, uint asize);
2007-04-17 08:49:19 +00:00
// @@ Add palette quantization algorithms!
}
}
#endif // NV_IMAGE_QUANTIZE_H