Image data.
|
Public Member Functions |
| | img () |
| | Construct.
|
| | ~img () |
| | Destroy.
|
| bool | set_url (const char *url, const doc2 *relative=0) |
| | Load an image.
|
| bool | try_urls (const std::vector< std::string > &urls, const doc2 *relative=0) |
| | Call img::set_url for each URI in urls until one successfully loads an image.
|
| const char * | url () const |
| | The URI of the currently loaded image.
|
| size_t | w () const |
| | Image width.
|
| size_t | h () const |
| | Image height.
|
| size_t | nc () const |
| | Number of components.
|
| size_t | nframes () const |
| | Number of frames.
|
| const unsigned char * | pixels () const |
| | Pixel data.
|
| const unsigned char * | pixels (size_t frame) const |
| | The pixel data for a frrame of the currently loaded image.
|
Private Attributes |
| doc * | url_ |
| | Resource.
|
| size_t | w_ |
| | Image width.
|
| size_t | h_ |
| | Image height.
|
| size_t | nc_ |
| | Number of components.
|
| size_t | nframes_ |
| | Number of frames.
|
| unsigned char * | pixels_ |
| | Pixel data.
|
| unsigned char ** | frame_ |
| | Frame data for time-dependent images.
|