Go to the source code of this file.
Classes | |
struct | ASMappedColor |
struct | ASSortedColorBucket |
struct | ASSortedColorHash |
struct | ASColormapEntry |
struct | ASColormap |
Defines | |
#define | MAKE_INDEXED_COLOR3(red, green, blue) ((((green&0x200)|(blue&0x100)|(red&0x80))<<14)) |
#define | MAKE_INDEXED_COLOR6(red, green, blue) |
#define | MAKE_INDEXED_COLOR9(red, green, blue) |
#define | MAKE_INDEXED_COLOR12(red, green, blue) |
#define | MAKE_INDEXED_COLOR15(red, green, blue) |
#define | MAKE_INDEXED_COLOR18(red, green, blue) |
#define | MAKE_INDEXED_COLOR21(red, green, blue) |
#define | MAKE_INDEXED_COLOR24(red, green, blue) |
#define | INDEX_SHIFT_RED(r) (r) |
#define | INDEX_SHIFT_GREEN(g) ((g)<<2) |
#define | INDEX_SHIFT_BLUE(b) ((b)<<1) |
#define | INDEX_UNSHIFT_RED(r) (r) |
#define | INDEX_UNSHIFT_GREEN(g) ((g)>>2) |
#define | INDEX_UNSHIFT_BLUE(b) ((b)>>1) |
#define | INDEX_UNESHIFT_RED(r, e) ((r)>>(e)) |
#define | INDEX_UNESHIFT_GREEN(g, e) ((g)>>(2+(e))) |
#define | INDEX_UNESHIFT_BLUE(b, e) ((b)>>(1+(e))) |
#define | SLOTS_OFFSET24 15 |
#define | SLOTS_MASK24 0x1FF |
#define | SLOTS_OFFSET21 12 |
#define | SLOTS_MASK21 0x1FF |
#define | MAKE_INDEXED_COLOR MAKE_INDEXED_COLOR21 |
#define | SLOTS_OFFSET 9 |
#define | SLOTS_MASK 0xFFF |
#define | MAX_COLOR_BUCKETS 4096 |
Functions | |
void | add_index_color (ASSortedColorHash *index, CARD32 indexed, unsigned int slot, CARD32 red, CARD32 green, CARD32 blue) |
void | destroy_colorhash (ASSortedColorHash *index, Bool reusable) |
unsigned int | add_colormap_items (ASSortedColorHash *index, unsigned int start, unsigned int stop, unsigned int quota, unsigned int base, ASColormapEntry *entries) |
void | fix_colorindex_shortcuts (ASSortedColorHash *index) |
int | get_color_index (ASSortedColorHash *index, CARD32 indexed, unsigned int slot) |
ASColormap * | color_hash2colormap (ASColormap *cmap, unsigned int max_colors) |
int * | colormap_asimage (ASImage *im, ASColormap *cmap, unsigned int max_colors, unsigned int dither, int opaque_threshold) |
void | destroy_colormap (ASColormap *cmap, Bool reusable) |
Definition at line 100 of file ascmap.h.
Referenced by colormap_asimage(), TASImage::Vectorize(), and vectorize_asimage().
Definition at line 99 of file ascmap.h.
Referenced by colormap_asimage(), TASImage::Vectorize(), and vectorize_asimage().
Definition at line 98 of file ascmap.h.
Referenced by colormap_asimage(), TASImage::Vectorize(), and vectorize_asimage().
Value:
Definition at line 94 of file ascmap.h.
Referenced by colormap_asimage(), TASImage::Vectorize(), and vectorize_asimage().
#define MAX_COLOR_BUCKETS 4096 |
unsigned int add_colormap_items | ( | ASSortedColorHash * | index, | |
unsigned int | start, | |||
unsigned int | stop, | |||
unsigned int | quota, | |||
unsigned int | base, | |||
ASColormapEntry * | entries | |||
) |
Definition at line 242 of file ascmap.c.
References add_colormap_item(), ASMappedColor::count, entries, NULL, and total.
Referenced by color_hash2colormap().
void add_index_color | ( | ASSortedColorHash * | index, | |
CARD32 | indexed, | |||
unsigned int | slot, | |||
CARD32 | red, | |||
CARD32 | green, | |||
CARD32 | blue | |||
) |
Definition at line 86 of file ascmap.c.
References ASSortedColorBucket::count, ASMappedColor::count, ASSortedColorBucket::head, ASMappedColor::indexed, new_mapped_color(), ASMappedColor::next, NULL, and ASSortedColorBucket::tail.
Referenced by colormap_asimage().
ASColormap* color_hash2colormap | ( | ASColormap * | cmap, | |
unsigned int | max_colors | |||
) |
Definition at line 309 of file ascmap.c.
References add_colormap_items(), ASColormap::count, ASColormap::entries, ASColormap::hash, LOCAL_DEBUG_OUT, MIN, NULL, safemalloc, and total.
Referenced by colormap_asimage().
int* colormap_asimage | ( | ASImage * | im, | |
ASColormap * | cmap, | |||
unsigned int | max_colors, | |||
unsigned int | dither, | |||
int | opaque_threshold | |||
) |
Definition at line 407 of file ascmap.c.
References a, add_index_color(), ASScanline::alpha, ASFLAGS_EVERYTHING, b, blue, ASScanline::blue, ASSortedColorHash::buckets, ASSortedColorHash::buckets_num, ASImageDecoder::buffer, color_hash2colormap(), ASColormap::count, ASImageDecoder::decode_image_scanline, g, get_color_index(), green, ASScanline::green, ASColormap::has_opaque, ASColormap::hash, ASImage::height, INDEX_SHIFT_BLUE, INDEX_SHIFT_GREEN, INDEX_SHIFT_RED, INDEX_UNESHIFT_BLUE, INDEX_UNESHIFT_GREEN, INDEX_UNESHIFT_RED, LOCAL_DEBUG_OUT, MAKE_INDEXED_COLOR12, MAKE_INDEXED_COLOR15, MAKE_INDEXED_COLOR18, MAKE_INDEXED_COLOR21, MAKE_INDEXED_COLOR24, MAKE_INDEXED_COLOR3, MAKE_INDEXED_COLOR6, MAKE_INDEXED_COLOR9, MAX_COLOR_BUCKETS, NULL, print_asimage(), ASScanline::red, red, safecalloc, safemalloc, SCL_DO_ALL, SHOW_TIME, start_image_decoding(), START_TIME, stop_image_decoding(), True, ASImage::width, x, x07, and y.
Referenced by ASImage2gif(), ASImage2xpm(), ASImage2xpmRawBuff(), TASImage::Vectorize(), and vectorize_asimage().
void destroy_colorhash | ( | ASSortedColorHash * | index, | |
Bool | reusable | |||
) |
void destroy_colormap | ( | ASColormap * | cmap, | |
Bool | reusable | |||
) |
Definition at line 357 of file ascmap.c.
References destroy_colorhash(), ASColormap::entries, False, free(), and ASColormap::hash.
Referenced by ASImage2gif(), ASImage2xpm(), ASImage2xpmRawBuff(), TASImage::Vectorize(), and vectorize_asimage().
void fix_colorindex_shortcuts | ( | ASSortedColorHash * | index | ) |
int get_color_index | ( | ASSortedColorHash * | index, | |
CARD32 | indexed, | |||
unsigned int | slot | |||
) |
Definition at line 371 of file ascmap.c.
References ASMappedColor::cmap_idx, ASSortedColorBucket::head, ASMappedColor::indexed, LOCAL_DEBUG_OUT, ASMappedColor::next, NULL, and ASSortedColorBucket::tail.
Referenced by colormap_asimage().