|
Visual Computing Library
devel
|
The Image class stores an Image in 4 bytes RGBA format. More...
#include <vclib/space/core/image.h>
Public Member Functions | |
| const unsigned char * | data () const |
| void | deserialize (std::istream &is) |
| int | height () const |
| Image (Array2< uint > &&img) | |
| Image (const Array2< uint > &img) | |
| Image (const void *data, uint w, uint h, bool yFlip=false, Color::Format format=Color::Format::ABGR) | |
| Construct an Image from a raw buffer, which is assumed to be in the given format (default: ABGR). | |
| bool | isNull () const |
| void | mirror (bool horizontal=false, bool vertical=true) |
| Color | pixel (uint i, uint j) const |
| void | serialize (std::ostream &os) const |
| std::size_t | sizeInBytes () const |
| int | width () const |
Private Attributes | |
| Array2< uint > | mImg |
The Image class stores an Image in 4 bytes RGBA format.
Each pixel is stored as 4 bytes, with the first byte representing RGBA in a uint32_t.
|
inline |
Construct an Image from a raw buffer, which is assumed to be in the given format (default: ABGR).
| [in] | data | the raw buffer. |
| [in] | w | the width of the image. |
| [in] | h | the height of the image. |
| [in] | yFlip | if true, the image is flipped along the y axis. |
| [in] | format | the format of the buffer, that is the way each pixel (4 bytes) is stored. |