#include "scanline.h"
Go to the source code of this file.
Classes | |
struct | ASXpmFile |
struct | ASXpmCharmap |
Defines | |
#define | MAX_XPM_BPP 16 |
#define | AS_XPM_BUFFER_UNDO 8 |
#define | AS_XPM_BUFFER_SIZE 8192 |
Enumerations | |
enum | ASXpmParseState |
enum | ASXpmStatus |
Functions | |
void | close_xpm_file (ASXpmFile **xpm_file) |
ASXpmFile * | open_xpm_file (const char *realfilename) |
Bool | parse_xpm_header (ASXpmFile *xpm_file) |
ASXpmStatus | get_xpm_string (ASXpmFile *xpm_file) |
ASImage * | create_xpm_image (ASXpmFile *xpm_file, int compression) |
Bool | build_xpm_colormap (ASXpmFile *xpm_file) |
Bool | convert_xpm_scanline (ASXpmFile *xpm_file, unsigned int line) |
ASXpmCharmap * | build_xpm_charmap (struct ASColormap *cmap, Bool has_alpha, ASXpmCharmap *reusable_memory) |
void | destroy_xpm_charmap (ASXpmCharmap *xpm_cmap, Bool reusable) |
#define AS_XPM_BUFFER_SIZE 8192 |
#define AS_XPM_BUFFER_UNDO 8 |
Definition at line 30 of file xpm.h.
Referenced by get_xpm_char(), open_xpm_data(), open_xpm_file(), and open_xpm_raw_data().
#define MAX_XPM_BPP 16 |
Definition at line 23 of file xpm.h.
Referenced by open_xpm_data(), open_xpm_file(), and open_xpm_raw_data().
enum ASXpmParseState |
enum ASXpmStatus |
ASXpmCharmap* build_xpm_charmap | ( | struct ASColormap * | cmap, | |
Bool | has_alpha, | |||
ASXpmCharmap * | reusable_memory | |||
) |
Definition at line 952 of file xpm.c.
References ASXpmCharmap::char_code, ASColormap::count, ASXpmCharmap::count, ASXpmCharmap::cpp, i, int, k, MAXPRINTABLE, printable, ptr, and safemalloc.
Referenced by ASImage2xpm(), and ASImage2xpmRawBuff().
Definition at line 777 of file xpm.c.
References add_hash_item, argb, ARGB32_ALPHA8, ASXpmFile::bpp, calloc(), casestring_compare, casestring_hash_value, ASXpmFile::cmap, ASXpmFile::cmap2, ASXpmFile::cmap_name_xref, ASXpmFile::cmap_size, create_ashash, destroy_ashash, ASXpmFile::do_alpha, False, free(), ASXpmFile::full_alpha, get_xpm_string(), i, int, LOCAL_DEBUG_OUT, lookup_xpm_color(), mystrndup, name, NULL, parse_xpm_cmap_entry(), safecalloc, size_t, ASXpmFile::str_buf, string_compare, string_hash_value, string_value_destroy(), True, XPM_Success, and XpmRGB_Colors.
Referenced by xpm_file2ASImage().
void close_xpm_file | ( | ASXpmFile ** | xpm_file | ) |
Definition at line 505 of file xpm.c.
References close, destroy_ashash, free(), free_scanline(), i, NULL, and True.
Referenced by open_xpm_data(), open_xpm_file(), open_xpm_raw_data(), xpm2ASImage(), xpm_data2ASImage(), and xpmRawBuff2ASImage().
Definition at line 877 of file xpm.c.
References a, ASScanline::alpha, ARGB32_ALPHA8, ARGB32_BLUE8, ARGB32_GREEN8, ARGB32_RED8, AS_HASHABLE, b, ASScanline::blue, c, ASHashData::c32, ASXpmFile::cmap, ASXpmFile::data, data, ASXpmFile::do_alpha, False, free(), g, get_hash_item, get_xpm_string(), ASScanline::green, i, k, NULL, ASScanline::red, safemalloc, ASXpmFile::scl, True, ASHashData::vptr, ASXpmFile::width, and XPM_Success.
Referenced by xpm_file2ASImage().
Definition at line 728 of file xpm.c.
References create_asimage(), ASXpmFile::height, NULL, and ASXpmFile::width.
Referenced by xpm_file2ASImage().
void destroy_xpm_charmap | ( | ASXpmCharmap * | xpm_cmap, | |
Bool | reusable | |||
) |
Definition at line 981 of file xpm.c.
References ASXpmCharmap::char_code, and free().
Referenced by ASImage2xpm(), and ASImage2xpmRawBuff().
ASXpmStatus get_xpm_string | ( | ASXpmFile * | xpm_file | ) |
Definition at line 664 of file xpm.c.
References ASXpmFile::buffer, ASXpmFile::curr_img, ASXpmFile::curr_img_line, ASXpmFile::data, NULL, ASXpmFile::parse_state, read_next_xpm_string(), seek_next_xpm_image(), seek_next_xpm_string(), ASXpmFile::str_buf, ASXpmFile::str_buf_size, XPM_EndOfFile, XPM_EndOfImage, XPM_Error, XPM_InFile, XPM_InImage, and XPM_Success.
Referenced by build_xpm_colormap(), convert_xpm_scanline(), open_xpm_data(), open_xpm_file(), and open_xpm_raw_data().
ASXpmFile* open_xpm_file | ( | const char * | realfilename | ) |
Definition at line 542 of file xpm.c.
References AS_XPM_BUFFER_SIZE, AS_XPM_BUFFER_UNDO, ASXpmFile::bpp, ASXpmFile::buffer, ASXpmFile::bytes_in, close_xpm_file(), ASXpmFile::cmap_size, ASXpmFile::curr_byte, ASXpmFile::data, False, ASXpmFile::fd, get_xpm_string(), ASXpmFile::height, MAX_IMPORT_IMAGE_SIZE, MAX_XPM_BPP, NULL, open, ASXpmFile::parse_state, parse_xpm_header(), prepare_scanline(), read, safecalloc, safemalloc, ASXpmFile::scl, True, ASXpmFile::width, XPM_InFile, and XPM_Success.
Referenced by xpm2ASImage().
Definition at line 698 of file xpm.c.
References ASXpmFile::bpp, ASXpmFile::cmap_size, False, ASXpmFile::height, NULL, ptr, ASXpmFile::str_buf, True, and ASXpmFile::width.
Referenced by open_xpm_data(), open_xpm_file(), and open_xpm_raw_data().