porymap/include/core/paletteutil.h
2021-02-17 18:20:14 -06:00

25 lines
762 B
C++

#pragma once
#ifndef PALETTEUTIL_H
#define PALETTEUTIL_H
#include <QList>
#include <QRgb>
#include <QString>
class PaletteUtil {
public:
PaletteUtil();
QList<QRgb> parse(QString filepath, bool* error);
void writeJASC(QString filepath, QVector<QRgb> colors, int offset, int nColors);
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);
};
#endif // PALETTEUTIL_H