2023-11-17 12:30:24 -08:00
|
|
|
#pragma once
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <Magick++.h>
|
2023-11-18 12:55:26 -08:00
|
|
|
#include <string>
|
2023-11-17 12:30:24 -08:00
|
|
|
using namespace Magick;
|
|
|
|
class PaletteEntry {
|
|
|
|
public:
|
|
|
|
uint8_t r;
|
|
|
|
uint8_t g;
|
|
|
|
uint8_t b;
|
2023-11-18 12:55:26 -08:00
|
|
|
uint16_t hash() const;
|
|
|
|
void write(uint8_t *ptr) const;
|
|
|
|
ColorRGB toColor() const;
|
|
|
|
std::string to_string() const;
|
2023-11-17 12:30:24 -08:00
|
|
|
PaletteEntry();
|
|
|
|
PaletteEntry(uint8_t *ptr);
|
|
|
|
PaletteEntry(uint8_t r, uint8_t g, uint8_t b);
|
|
|
|
PaletteEntry(const ColorRGB &color);
|
|
|
|
};
|