mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-12 00:00:44 -04:00
Convert image into 4 bit color table format
This commit is contained in:
parent
9af2730879
commit
af4817378c
2 changed files with 119 additions and 1 deletions
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include <QTextCursor>
|
||||
#include <QWidget>
|
||||
#include <qiterator.h>
|
||||
|
||||
class ImageUtil
|
||||
{
|
||||
|
@ -14,6 +15,9 @@ public:
|
|||
|
||||
private:
|
||||
static bool checkSize(QString& embeddedImage, const QImage& img, int maxBytes = -1);
|
||||
static void quantization(const QImage& img, QVector<QRgb>& palette);
|
||||
static void quantization(QList<QRgb>::iterator begin, QList<QRgb>::iterator end, int depth, QVector<QRgb>& palette);
|
||||
static void avgbucket(QList<QRgb>::iterator begin, QList<QRgb>::iterator end, QVector<QRgb>& palette);
|
||||
};
|
||||
|
||||
#endif // IMAGEUTIL_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue