|
NovaSVG 0.10.0
A header-only SVG library
|
#include <bitmap.h>
Classes | |
| struct | write_context |
Public Types | |
| typedef unsigned int | iw_uint32 |
| typedef int | iw_uint32_size_check[sizeof(iw_uint32)==4 ? 1 :-1] |
Static Public Member Functions | |
| static void | set_flip_vertically_on_write (int flag) |
| static void | write_start_callbacks (write_context *s, write_func_t c, void *context) |
| static void | write_stdio_callback (void *context, void *data, int size) |
| static FILE * | open_file (char const *filename, char const *mode) |
| static int | write_start_file (write_context *s, const char *filename) |
| static void | write_end_file (write_context *s) |
| static void | write_formatted_v (write_context *s, const char *fmt, va_list v) |
| static void | write_formatted (write_context *s, const char *fmt,...) |
| static void | write_flush (write_context *s) |
| static void | write_putc (write_context *s, unsigned char c) |
| static void | write_u8 (write_context *s, unsigned char a) |
| static void | write_u8x3 (write_context *s, unsigned char a, unsigned char b, unsigned char c) |
| static void | write_pixel (write_context *s, int rgb_dir, int comp, int write_alpha, int expand_mono, unsigned char *d) |
| static void | write_pixels (write_context *s, int rgb_dir, int vdir, int x, int y, int comp, void *data, int write_alpha, int scanline_pad, int expand_mono) |
| static int | outfile (write_context *s, int rgb_dir, int vdir, int x, int y, int comp, int expand_mono, void *data, int alpha, int pad, const char *fmt,...) |
| static int | write_bmp_core (write_context *s, int x, int y, int comp, const void *data) |
| static int | write_bmp_to_func (write_func_t func, void *context, int x, int y, int comp, const void *data) |
| static int | write_bmp (char const *filename, int x, int y, int comp, const void *data) |
| static int | write_tga_core (write_context *s, int x, int y, int comp, void *data) |
| NOVASVG_IW_NO_STDIO. | |
| static int | write_tga_to_func (write_func_t func, void *context, int x, int y, int comp, const void *data) |
| static int | write_tga (char const *filename, int x, int y, int comp, const void *data) |
| static void | hdr_linear_to_rgbe (unsigned char *rgbe, float *linear) |
| static void | hdr_write_run_data (write_context *s, int length, unsigned char databyte) |
| static void | hdr_write_dump_data (write_context *s, int length, unsigned char *data) |
| static void | hdr_write_scanline (write_context *s, int width, int ncomp, unsigned char *scratch, float *scanline) |
| static int | write_hdr_core (write_context *s, int x, int y, int comp, float *data) |
| static int | write_hdr_to_func (write_func_t func, void *context, int x, int y, int comp, const float *data) |
| static int | write_hdr (char const *filename, int x, int y, int comp, const float *data) |
| static void * | sb_growf (void **arr, int increment, int itemsize) |
| static unsigned char * | zlib_flushf (unsigned char *data, unsigned int *bitbuffer, int *bitcount) |
| static int | zlib_bitrev (int code, int codebits) |
| static unsigned int | zlib_countm (unsigned char *a, unsigned char *b, int limit) |
| static unsigned int | g_zlib_hash_table (unsigned char *data) |
| static unsigned char * | zlib_compress (unsigned char *data, int data_len, int *out_len, int quality) |
| static unsigned int | png_crc32 (unsigned char *buffer, int len) |
| static void | png_write_crc (unsigned char **data, int len) |
| static unsigned char | png_paeth_predictor (int a, int b, int c) |
| static void | png_encode_line (unsigned char *pixels, int stride_bytes, int width, int height, int y, int n, int filter_type, signed char *line_buffer) |
| static unsigned char * | write_png_to_mem (const unsigned char *pixels, int stride_bytes, int x, int y, int n, int *out_len) |
| static int | write_png (char const *filename, int x, int y, int comp, const void *data, int stride_bytes) |
| static int | write_png_to_func (write_func_t func, void *context, int x, int y, int comp, const void *data, int stride_bytes) |
| static void | jpg_write_bits (write_context *s, int *bitBufP, int *bitCntP, const unsigned short *bs) |
| static void | jpg_dct (float *d0p, float *d1p, float *d2p, float *d3p, float *d4p, float *d5p, float *d6p, float *d7p) |
| static void | jpg_calc_bits (int val, unsigned short bits[2]) |
| static int | jpg_process_du (write_context *s, int *bitBuf, int *bitCnt, float *CDU, int du_stride, float *fdtbl, int DC, const unsigned short HTDC[256][2], const unsigned short HTAC[256][2]) |
| static int | write_jpg_core (write_context *s, int width, int height, int comp, const void *data, int quality) |
| static int | write_jpg_to_func (write_func_t func, void *context, int x, int y, int comp, const void *data, int quality) |
| static int | write_jpg (char const *filename, int x, int y, int comp, const void *data, int quality) |
Static Public Attributes | |
| static int | g_png_compression_level = 8 |
| static int | g_tga_with_rle = 1 |
| static int | g_png_force_filter = -1 |
| static int | g_flip_vertically_on_write = 0 |
| static const unsigned char | jpg_zig_zag [] |
| typedef unsigned int novasvg::BitmapCodec::iw_uint32 |
| typedef int novasvg::BitmapCodec::iw_uint32_size_check[sizeof(iw_uint32)==4 ? 1 :-1] |
|
inlinestatic |
Definition at line 874 of file bitmap.h.
Referenced by zlib_compress().
|
inlinestatic |
|
inlinestatic |
Definition at line 671 of file bitmap.h.
References novasvg::BitmapCodec::write_context::context, novasvg::BitmapCodec::write_context::func, NOVASVG_IW_ASSERT, and NOVASVG_IW_UCHAR.
Referenced by hdr_write_scanline().
|
inlinestatic |
Definition at line 663 of file bitmap.h.
References novasvg::BitmapCodec::write_context::context, novasvg::BitmapCodec::write_context::func, NOVASVG_IW_ASSERT, and NOVASVG_IW_UCHAR.
Referenced by hdr_write_scanline().
|
inlinestatic |
Definition at line 679 of file bitmap.h.
References novasvg::BitmapCodec::write_context::context, novasvg::BitmapCodec::write_context::func, hdr_linear_to_rgbe(), hdr_write_dump_data(), and hdr_write_run_data().
Referenced by write_hdr_core().
|
inlinestatic |
Definition at line 1325 of file bitmap.h.
Referenced by jpg_process_du().
|
inlinestatic |
Definition at line 1277 of file bitmap.h.
Referenced by jpg_process_du().
|
inlinestatic |
Definition at line 1335 of file bitmap.h.
References jpg_calc_bits(), jpg_dct(), jpg_write_bits(), and jpg_zig_zag.
Referenced by write_jpg_core().
|
inlinestatic |
Definition at line 1260 of file bitmap.h.
References write_putc().
Referenced by jpg_process_du(), and write_jpg_core().
|
inlinestatic |
Definition at line 311 of file bitmap.h.
Referenced by write_png(), and write_start_file().
|
inlinestatic |
Definition at line 485 of file bitmap.h.
References write_formatted_v(), and write_pixels().
Referenced by write_bmp_core(), and write_tga_core().
|
inlinestatic |
Definition at line 1031 of file bitmap.h.
Referenced by png_write_crc().
|
inlinestatic |
Definition at line 1099 of file bitmap.h.
References g_flip_vertically_on_write, and png_paeth_predictor().
Referenced by write_png_to_mem().
|
inlinestatic |
Definition at line 1090 of file bitmap.h.
References NOVASVG_IW_UCHAR.
Referenced by png_encode_line().
|
inlinestatic |
Definition at line 1084 of file bitmap.h.
References png_crc32(), and zlib_write_u32.
Referenced by write_png_to_mem().
|
inlinestatic |
Definition at line 833 of file bitmap.h.
References NOVASVG_IW_ASSERT, NOVASVG_IW_REALLOC_SIZED, sb_m, and sb_raw.
|
inlinestatic |
Definition at line 269 of file bitmap.h.
References g_flip_vertically_on_write.
|
inlinestatic |
Definition at line 527 of file bitmap.h.
References write_bmp_core(), write_end_file(), and write_start_file().
Referenced by novasvg::Bitmap::writeToBmp().
|
inlinestatic |
Definition at line 499 of file bitmap.h.
References outfile().
Referenced by write_bmp(), and write_bmp_to_func().
|
inlinestatic |
Definition at line 519 of file bitmap.h.
References write_bmp_core(), and write_start_callbacks().
Referenced by novasvg::Bitmap::writeToBmp().
|
inlinestatic |
Definition at line 346 of file bitmap.h.
References novasvg::BitmapCodec::write_context::context.
Referenced by write_bmp(), write_hdr(), write_jpg(), and write_tga().
|
inlinestatic |
Definition at line 393 of file bitmap.h.
References novasvg::BitmapCodec::write_context::buf_used, novasvg::BitmapCodec::write_context::buffer, novasvg::BitmapCodec::write_context::context, and novasvg::BitmapCodec::write_context::func.
Referenced by write_pixels(), write_tga_core(), write_u8(), and write_u8x3().
|
inlinestatic |
Definition at line 385 of file bitmap.h.
References write_formatted_v().
Referenced by write_tga_core().
|
inlinestatic |
Definition at line 356 of file bitmap.h.
References novasvg::BitmapCodec::write_context::context, novasvg::BitmapCodec::write_context::func, NOVASVG_IW_ASSERT, and NOVASVG_IW_UCHAR.
Referenced by outfile(), and write_formatted().
|
inlinestatic |
Definition at line 801 of file bitmap.h.
References write_end_file(), write_hdr_core(), and write_start_file().
|
inlinestatic |
Definition at line 768 of file bitmap.h.
References novasvg::BitmapCodec::write_context::context, novasvg::BitmapCodec::write_context::func, g_flip_vertically_on_write, hdr_write_scanline(), NOVASVG_IW_FREE, and NOVASVG_IW_MALLOC.
Referenced by write_hdr(), and write_hdr_to_func().
|
inlinestatic |
Definition at line 794 of file bitmap.h.
References write_hdr_core(), and write_start_callbacks().
|
inlinestatic |
Definition at line 1623 of file bitmap.h.
References write_end_file(), write_jpg_core(), and write_start_file().
Referenced by novasvg::Bitmap::writeToJpg().
|
inlinestatic |
Definition at line 1405 of file bitmap.h.
References novasvg::BitmapCodec::write_context::context, novasvg::BitmapCodec::write_context::func, g_flip_vertically_on_write, jpg_process_du(), jpg_write_bits(), jpg_zig_zag, NOVASVG_IW_UCHAR, write_putc(), and novasvg::Y.
Referenced by write_jpg(), and write_jpg_to_func().
|
inlinestatic |
Definition at line 1614 of file bitmap.h.
References write_jpg_core(), and write_start_callbacks().
Referenced by novasvg::Bitmap::writeToJpg().
|
inlinestatic |
Definition at line 425 of file bitmap.h.
References write_u8(), and write_u8x3().
Referenced by write_pixels(), and write_tga_core().
|
inlinestatic |
Definition at line 458 of file bitmap.h.
References novasvg::BitmapCodec::write_context::context, novasvg::BitmapCodec::write_context::func, g_flip_vertically_on_write, write_flush(), and write_pixel().
Referenced by outfile().
|
inlinestatic |
Definition at line 1222 of file bitmap.h.
References NOVASVG_IW_FREE, open_file(), and write_png_to_mem().
Referenced by novasvg::Bitmap::writeToPng().
|
inlinestatic |
Definition at line 1238 of file bitmap.h.
References NOVASVG_IW_FREE, and write_png_to_mem().
Referenced by novasvg::Bitmap::writeToPng().
|
inlinestatic |
Definition at line 1135 of file bitmap.h.
References g_png_compression_level, g_png_force_filter, NOVASVG_IW_ASSERT, NOVASVG_IW_FREE, NOVASVG_IW_MALLOC, NOVASVG_IW_MEMMOVE, NOVASVG_IW_UCHAR, png_encode_line(), png_write_crc(), png_write_tag, zlib_compress(), and zlib_write_u32.
Referenced by write_png(), and write_png_to_func().
|
inlinestatic |
Definition at line 401 of file bitmap.h.
References novasvg::BitmapCodec::write_context::context, and novasvg::BitmapCodec::write_context::func.
Referenced by jpg_write_bits(), and write_jpg_core().
|
inlinestatic |
Definition at line 283 of file bitmap.h.
References novasvg::BitmapCodec::write_context::context, and novasvg::BitmapCodec::write_context::func.
Referenced by write_bmp_to_func(), write_hdr_to_func(), write_jpg_to_func(), write_start_file(), and write_tga_to_func().
|
inlinestatic |
Definition at line 339 of file bitmap.h.
References open_file(), write_start_callbacks(), and write_stdio_callback().
Referenced by write_bmp(), write_hdr(), write_jpg(), and write_tga().
|
inlinestatic |
Definition at line 291 of file bitmap.h.
Referenced by write_start_file().
|
inlinestatic |
Definition at line 626 of file bitmap.h.
References write_end_file(), write_start_file(), and write_tga_core().
Referenced by novasvg::Bitmap::writeToTga().
|
inlinestatic |
NOVASVG_IW_NO_STDIO.
Definition at line 539 of file bitmap.h.
References g_flip_vertically_on_write, g_tga_with_rle, NOVASVG_IW_UCHAR, outfile(), write_flush(), write_formatted(), write_pixel(), and write_u8().
Referenced by write_tga(), and write_tga_to_func().
|
inlinestatic |
Definition at line 618 of file bitmap.h.
References write_start_callbacks(), and write_tga_core().
Referenced by novasvg::Bitmap::writeToTga().
|
inlinestatic |
Definition at line 406 of file bitmap.h.
References novasvg::BitmapCodec::write_context::buf_used, novasvg::BitmapCodec::write_context::buffer, and write_flush().
Referenced by write_pixel(), and write_tga_core().
|
inlinestatic |
Definition at line 413 of file bitmap.h.
References novasvg::BitmapCodec::write_context::buf_used, novasvg::BitmapCodec::write_context::buffer, and write_flush().
Referenced by write_pixel().
|
inlinestatic |
Definition at line 856 of file bitmap.h.
Referenced by zlib_compress().
|
inlinestatic |
Definition at line 902 of file bitmap.h.
References g_zlib_hash_table(), NOVASVG_IW_ASSERT, NOVASVG_IW_FREE, NOVASVG_IW_MALLOC, NOVASVG_IW_MEMMOVE, NOVASVG_IW_UCHAR, sb_count, sb_free, sb_n, sb_push, sb_raw, zlib_add, zlib_bitrev(), zlib_countm(), ZLIB_HASH, zlib_huff, and zlib_huffb.
Referenced by write_png_to_mem().
|
inlinestatic |
Definition at line 866 of file bitmap.h.
Referenced by zlib_compress().
|
inlinestatic |
Definition at line 846 of file bitmap.h.
References NOVASVG_IW_UCHAR, and sb_push.
|
inlinestatic |
Definition at line 267 of file bitmap.h.
Referenced by png_encode_line(), set_flip_vertically_on_write(), write_hdr_core(), write_jpg_core(), write_pixels(), and write_tga_core().
|
inlinestatic |
Definition at line 263 of file bitmap.h.
Referenced by write_png_to_mem().
|
inlinestatic |
Definition at line 265 of file bitmap.h.
Referenced by write_png_to_mem().
|
inlinestatic |
Definition at line 264 of file bitmap.h.
Referenced by write_tga_core().
|
inlinestatic |
Definition at line 1257 of file bitmap.h.
Referenced by jpg_process_du(), and write_jpg_core().