mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-21 03:16:54 +01:00
32 lines
587 B
C++
32 lines
587 B
C++
#ifndef IMAGE_INDEXER_H
|
|
#define IMAGE_INDEXER_H
|
|
|
|
#include "core/io/image.h"
|
|
#include "core/object/reference.h"
|
|
#include "core/variant/variant.h"
|
|
#include "core/containers/oa_hash_map.h"
|
|
|
|
class ImageIndexer : public Reference {
|
|
GDCLASS(ImageIndexer, Reference);
|
|
|
|
public:
|
|
PoolColorArray get_colors();
|
|
|
|
PoolIntArray index_image(Ref<Image> image);
|
|
void reset();
|
|
|
|
PoolByteArray indices_to_argb8_data(const PoolIntArray &indices);
|
|
|
|
ImageIndexer();
|
|
~ImageIndexer();
|
|
|
|
protected:
|
|
static void _bind_methods();
|
|
|
|
private:
|
|
PoolColorArray _colors;
|
|
OAHashMap<Color, int> _col_map;
|
|
};
|
|
|
|
#endif
|