2019-04-06 23:11:56 +01:00
|
|
|
#ifndef PALETTEUTIL_H
|
|
|
|
#define PALETTEUTIL_H
|
2019-01-05 17:20:33 +00:00
|
|
|
|
|
|
|
#include <QList>
|
|
|
|
#include <QRgb>
|
|
|
|
#include <QString>
|
|
|
|
|
2019-04-06 23:11:56 +01:00
|
|
|
class PaletteUtil
|
2019-01-05 17:20:33 +00:00
|
|
|
{
|
|
|
|
public:
|
2019-04-06 23:11:56 +01:00
|
|
|
PaletteUtil();
|
2019-01-05 17:20:33 +00:00
|
|
|
QList<QRgb> parse(QString filepath, bool *error);
|
2019-04-06 23:11:56 +01:00
|
|
|
void writeJASC(QString filepath, QVector<QRgb> colors, int offset, int nColors);
|
2019-01-05 17:20:33 +00:00
|
|
|
private:
|
|
|
|
QList<QRgb> parsePal(QString filepath, bool *error);
|
|
|
|
QList<QRgb> parseJASC(QString filepath, bool *error);
|
|
|
|
QList<QRgb> parseAdvanceMapPal(QString filepath, bool *error);
|
|
|
|
QList<QRgb> parseAdobeColorTable(QString filepath, bool *error);
|
|
|
|
QList<QRgb> parseTileLayerPro(QString filepath, bool *error);
|
|
|
|
QList<QRgb> parseAdvancePaletteEditor(QString filepath, bool *error);
|
|
|
|
int clampColorValue(int value);
|
|
|
|
};
|
|
|
|
|
2019-04-06 23:11:56 +01:00
|
|
|
#endif // PALETTEUTIL_H
|