LMMS
Loading...
Searching...
No Matches
lice_palette.cpp File Reference
#include "lice.h"
#include "../ptrlist.h"
#include "../wdltypes.h"

Classes

struct  ONode
struct  OTree

Macros

#define OCTREE_DEPTH   5

Functions

int LICE_BuildPalette (LICE_IBitmap *bmp, LICE_pixel *palette, int maxcolors)
static void AddColorToTree (OTree *, const LICE_pixel_chan *rgb)
static int FindColorInTree (OTree *, const LICE_pixel_chan *rgb)
static int PruneTree (OTree *)
static void DeleteNode (OTree *, ONode *, ONode **delete_to)
static int CollectLeaves (OTree *)
static int CollectNodeLeaves (ONode *node, LICE_pixel *palette, int colorcount)
voidLICE_CreateOctree (int maxcolors)
 palette
void LICE_ResetOctree (void *octree, int maxc)
void LICE_DestroyOctree (void *octree)
int LICE_BuildOctree (void *octree, LICE_IBitmap *bmp)
int LICE_BuildOctreeForAlpha (void *octree, LICE_IBitmap *bmp, unsigned int minalpha)
int LICE_BuildOctreeForDiff (void *octree, LICE_IBitmap *bmp, LICE_IBitmap *refbmp, LICE_pixel mask)
int LICE_FindInOctree (void *octree, LICE_pixel color)
int LICE_ExtractOctreePalette (void *octree, LICE_pixel *palette)
void LICE_TestPalette (LICE_IBitmap *bmp, LICE_pixel *palette, int numcolors)

Macro Definition Documentation

◆ OCTREE_DEPTH

#define OCTREE_DEPTH   5

Function Documentation

◆ AddColorToTree()

void AddColorToTree ( OTree * tree,
const LICE_pixel_chan * rgb )
static

◆ CollectLeaves()

int CollectLeaves ( OTree * tree)
static

◆ CollectNodeLeaves()

int CollectNodeLeaves ( ONode * node,
LICE_pixel * palette,
int colorcount )
static

◆ DeleteNode()

void DeleteNode ( OTree * tree,
ONode * p,
ONode ** delete_to )
static

◆ FindColorInTree()

int FindColorInTree ( OTree * tree,
const LICE_pixel_chan * rgb )
static

◆ LICE_BuildOctree()

int LICE_BuildOctree ( void * octree,
LICE_IBitmap * bmp )

◆ LICE_BuildOctreeForAlpha()

int LICE_BuildOctreeForAlpha ( void * octree,
LICE_IBitmap * bmp,
unsigned int minalpha )

◆ LICE_BuildOctreeForDiff()

int LICE_BuildOctreeForDiff ( void * octree,
LICE_IBitmap * bmp,
LICE_IBitmap * refbmp,
LICE_pixel mask )

◆ LICE_BuildPalette()

int LICE_BuildPalette ( LICE_IBitmap * bmp,
LICE_pixel * palette,
int maxcolors )

◆ LICE_CreateOctree()

void * LICE_CreateOctree ( int maxcolors)

palette

◆ LICE_DestroyOctree()

void LICE_DestroyOctree ( void * octree)

◆ LICE_ExtractOctreePalette()

int LICE_ExtractOctreePalette ( void * octree,
LICE_pixel * palette )

◆ LICE_FindInOctree()

int LICE_FindInOctree ( void * octree,
LICE_pixel color )

◆ LICE_ResetOctree()

void LICE_ResetOctree ( void * octree,
int maxc )

◆ LICE_TestPalette()

void LICE_TestPalette ( LICE_IBitmap * bmp,
LICE_pixel * palette,
int numcolors )

◆ PruneTree()

int PruneTree ( OTree * tree)
static