#include <image.H>
Public Member Functions | |
Image () | |
Image (Cstr_ptr &file) | |
Image (uint w, uint h, uint bpp, uchar *data, bool nd=1) | |
Image (uint w, uint h, uint bpp) | |
virtual | ~Image () |
void | set (int w, int h, uint bpp, uchar *data, bool nd=1) |
void | freedata () |
void | clear () |
bool | resize (uint w, uint h, uint b) |
bool | resize (uint w, uint h) |
int | copy_tile (const Image &tile, uint i, uint j) |
uint | width () const |
uint | height () const |
uint | bpp () const |
uint | size () const |
uint | row_size () const |
mlib::Point2i | dims () const |
uchar * | data () const |
uchar * | row (int k) const |
uchar * | copy () |
uchar | pixel (uint x, uint y) const |
uint | pixel_rgba (uint x, uint y) const |
uint | pixel_r (uint x, uint y) const |
uint | pixel_g (uint x, uint y) const |
uint | pixel_b (uint x, uint y) const |
uint | pixel_a (uint x, uint y) const |
bool | empty () const |
bool | expand_power2 () |
int | resize_rows_mult_4 () |
int | load_file (char *file) |
int | read_png (char *file) |
int | read_png (FILE *fp) |
int | write_png (char *file) const |
int | read_pnm (char *file) |
int | read_pgm (istream &in, bool ascii) |
int | read_ppm (istream &in, bool ascii) |
int | write_pnm (char *file) const |
Static Public Member Functions | |
static int | write_png (int w, int h, uint bpp, uchar *data, Cstr_ptr &file) |
Protected Types | |
enum | { PNG_BYTES_TO_CHECK = 8 } |
Protected Member Functions | |
FILE * | open_png (char *file) |
Protected Attributes | |
uint | _width |
uint | _height |
uint | _bpp |
uchar * | _data |
bool | _no_delete |
Definition at line 33 of file image.H.
|
|
|
|
|
Definition at line 46 of file image.H. References load_file(). |
|
Definition at line 55 of file image.H. References set(). |
|
Definition at line 58 of file image.H. References resize(). |
|
Definition at line 62 of file image.H. References clear(). |
|
Definition at line 119 of file image.H. References _bpp. Referenced by TEXTUREgl::bpp_to_format(), TEXTURE::expand_power2(), PaperEffect::get_texture(), TEXTUREgl::load_texture(), RefImage::read_file(), XToonTexture::update_tex(), and ToonTexture_1D::update_tex(). |
|
Definition at line 84 of file image.H. References _bpp, _height, _no_delete, _width, and freedata(). Referenced by TEXTUREgl::copy_texture(), read_pgm(), read_png(), read_ppm(), set(), and ~Image(). |
|
Definition at line 25 of file image.C. References _data, empty(), err_ret(), and size(). Referenced by PaperEffect::get_texture(), TEXTUREgl::load_texture(), XToonTexture::update_tex(), and ToonTexture_1D::update_tex(). |
|
Definition at line 60 of file image.C. References _bpp, _height, _width, err_msg(), row(), and row_size(). Referenced by VIEW::screen_grab(). |
|
Definition at line 123 of file image.H. References _data. Referenced by RefImage::copy_rgb(), expand_power2(), TEXTUREgl::load_texture(), Recorder::post_draw_CB(), Animator::post_draw_CB(), RefImage::read_file(), and VIEW::screen_grab(). |
|
Definition at line 122 of file image.H. References _height, and _width. Referenced by TEXTUREgl::get_size(). |
|
Definition at line 138 of file image.H. References _bpp, _data, _height, and _width. Referenced by copy(), TEXTURE::expand_image(), expand_power2(), PaperEffect::get_texture(), TEXTURE::load_image(), TEXTUREgl::load_texture(), resize_rows_mult_4(), TEXTURE::set_image(), XToonTexture::update_tex(), and ToonTexture_1D::update_tex(). |
|
Definition at line 329 of file image.C. References _bpp, _data, _height, _width, data(), empty(), err_ret(), getPower2Size(), and set(). Referenced by TEXTURE::expand_image(), and TEXTURE::expand_power2(). |
|
Definition at line 77 of file image.H. References _data, and _no_delete. Referenced by clear(), and TEXTUREgl::load_texture(). |
|
Definition at line 118 of file image.H. References _height. Referenced by TEXTURE::expand_image(), PaperEffect::get_texture(), TEXTUREgl::load_texture(), main(), TexMemRefImage::read_FB(), RefImage::read_file(), TexMemRefImage::resize(), VIEW::screen_grab(), XToonTexture::update_tex(), and ToonTexture_1D::update_tex(). |
|
Definition at line 103 of file image.C. References ERR_INCL_ERRNO, ERR_LEV_INFO, err_mesg(), read_png(), and read_pnm(). Referenced by PaperEffect::get_texture(), Image(), TEXTURE::load_image(), RefImage::read_file(), XToonTexture::update_tex(), and ToonTexture_1D::update_tex(). |
|
Definition at line 364 of file image.C. References err_ret(), and PNG_BYTES_TO_CHECK. Referenced by read_png(). |
|
Definition at line 127 of file image.H. References _bpp, _height, _width, and row(). Referenced by main(). |
|
Definition at line 682 of file image.C. References pixel_rgba(), and rgba_to_a(). |
|
Definition at line 676 of file image.C. References pixel_rgba(), and rgba_to_b(). |
|
Definition at line 670 of file image.C. References pixel_rgba(), and rgba_to_g(). |
|
Definition at line 664 of file image.C. References pixel_rgba(), and rgba_to_r(). |
|
Definition at line 632 of file image.C. References _bpp, _height, _width, build_rgba(), err_msg(), and row(). Referenced by pixel_a(), pixel_b(), pixel_g(), and pixel_r(). |
|
Definition at line 175 of file image.C. References _bpp, _data, _height, _no_delete, _width, clear(), eat_whitespace(), err_ret(), pnm_read_int(), and row(). Referenced by read_pnm(). |
|
Definition at line 419 of file image.C. References _bpp, _data, _height, _no_delete, _width, clear(), err_msg(), err_ret(), PNG_BYTES_TO_CHECK, and size(). |
|
Definition at line 401 of file image.C. References err_msg(), and open_png(). Referenced by load_file(), and main(). |
|
Definition at line 135 of file image.C. References err_ret(), read_pgm(), and read_ppm(). Referenced by load_file(). |
|
Definition at line 233 of file image.C. References _bpp, _data, _height, _no_delete, _width, clear(), eat_whitespace(), err_ret(), pnm_read_int(), and row(). Referenced by read_pnm(). |
|
|
|
Definition at line 90 of file image.H. References _bpp, _data, _height, _no_delete, _width, err_ret(), and size(). Referenced by RefImage::copy_rgb(), TEXTURE::expand_power2(), Image(), resize(), and AUX_JOB::set_size(). |
|
Definition at line 39 of file image.C. References _bpp, _height, _width, empty(), err_ret(), row(), row_size(), and set(). |
|
Definition at line 124 of file image.H. References _data, and row_size(). Referenced by copy_tile(), pixel(), pixel_rgba(), read_pgm(), read_ppm(), resize_rows_mult_4(), and write_png(). |
|
Definition at line 121 of file image.H. Referenced by copy_tile(), resize_rows_mult_4(), and row(). |
|
Definition at line 64 of file image.H. References _bpp, _data, _height, _no_delete, _width, clear(), and err_msg(). Referenced by expand_power2(), Image(), resize_rows_mult_4(), and TEXTURE::set_image(). |
|
Definition at line 120 of file image.H. References _bpp, _height, and _width. Referenced by copy(), read_png(), and resize(). |
|
Definition at line 117 of file image.H. References _width. Referenced by TEXTURE::expand_image(), PaperEffect::get_texture(), TEXTUREgl::load_texture(), main(), TexMemRefImage::read_FB(), RefImage::read_file(), TexMemRefImage::resize(), VIEW::screen_grab(), XToonTexture::update_tex(), and ToonTexture_1D::update_tex(). |
|
Definition at line 155 of file image.H. References write_png(). |
|
Definition at line 539 of file image.C. References _bpp, _data, _height, _width, err_msg(), err_ret(), Config::get_var_dbl(), and row(). Referenced by Recorder::post_draw_CB(), Animator::post_draw_CB(), VIEW::screen_grab(), RefImage::write_file(), and write_png(). |
|
Definition at line 290 of file image.C. References _bpp, _data, _height, _width, and err_msg(). Referenced by VIEW::screen_grab(). |
|
Definition at line 37 of file image.H. Referenced by bpp(), clear(), copy_tile(), empty(), expand_power2(), pixel(), pixel_rgba(), read_pgm(), read_png(), read_ppm(), resize(), resize_rows_mult_4(), row_size(), set(), size(), write_png(), and write_pnm(). |
|
Definition at line 38 of file image.H. Referenced by copy(), data(), empty(), expand_power2(), freedata(), read_pgm(), read_png(), read_ppm(), resize(), row(), set(), write_png(), and write_pnm(). |
|
Definition at line 36 of file image.H. Referenced by clear(), copy_tile(), dims(), empty(), expand_power2(), height(), pixel(), pixel_rgba(), read_pgm(), read_png(), read_ppm(), resize(), resize_rows_mult_4(), set(), size(), write_png(), and write_pnm(). |
|
Definition at line 39 of file image.H. Referenced by clear(), freedata(), read_pgm(), read_png(), read_ppm(), resize(), and set(). |
|
Definition at line 35 of file image.H. Referenced by clear(), copy_tile(), dims(), empty(), expand_power2(), pixel(), pixel_rgba(), read_pgm(), read_png(), read_ppm(), resize(), resize_rows_mult_4(), row_size(), set(), size(), width(), write_png(), and write_pnm(). |