#include <djv_jb2common.h>
Public Member Functions | |
| PackedBitmap () | |
| PackedBitmap (size_t inWidth, size_t inHeight) | |
| PackedBitmap (size_t inWidth, size_t inHeight, ssize_t inRowStride, const u8 *inImagePtr, bool inPacked=false) | |
| PackedBitmap (const PackedBitmap &inBitmap) | |
| size_t | getWidth () const |
| size_t | getHeight () const |
| ssize_t | getRowStride () const |
| const u8 * | getPtr () const |
| u8 * | getPtr () |
| void | swap (PackedBitmap &ioBitmap) |
| u8 * | allocate (size_t inWidth, size_t inHeight) |
| void | zeroClear () |
| bool | isIdentical (const PackedBitmap &inBitmap) const |
This class is used to preserve 1-bit black and white image, which defines JB2 shapes.
| Celartem::DjVu::PackedBitmap::PackedBitmap | ( | ) | [inline] |
Initialize a new instance.
With this constructor, you are responsible for all the content and the number of foreground bits.
| Celartem::DjVu::PackedBitmap::PackedBitmap | ( | size_t | inWidth, | |
| size_t | inHeight | |||
| ) | [inline] |
Initialize a new instance.
| inWidth | The width in pixels. | |
| inHeight | The heigth in pixels. |
With this constructor, you are responsible for all the content and the number of foreground bits.
| Celartem::DjVu::PackedBitmap::PackedBitmap | ( | size_t | inWidth, | |
| size_t | inHeight, | |||
| ssize_t | inRowStride, | |||
| const u8 * | inImagePtr, | |||
| bool | inPacked = false | |||
| ) |
Initialize a new instance.
| inWidth | The width in pixels. | |
| inHeight | The heigth in pixels. | |
| inRowStride | The row-stride in bytes. | |
| inImagePtr | Pointer to the image. The type of the image is determined by inPacked and if inPacked is false, each byte stands for a pixel. All the pixels with non-0 value will be translated as 1 and others as 0.Otherwise, if inPacked is ture, each bit stands for a pixel. MSB(0x80) in each byte is the left-side pixel of a sequential pixels and LSB(0x01) in the byte is the right-side pixel. 1 stands for a foreground pixel (usually in black) and 0 for a background pixel (usually in white). | |
| inPacked | If inImagePtr is a packed bitmap, this is true; otherwise if unpacked bitmap, this is false. |
| Celartem::DjVu::PackedBitmap::PackedBitmap | ( | const PackedBitmap & | inBitmap | ) | [inline] |
Duplicate an existing PackedBitmap instance.
| inBitmap | An instance to duplicate. |
| u8* Celartem::DjVu::PackedBitmap::allocate | ( | size_t | inWidth, | |
| size_t | inHeight | |||
| ) | [inline] |
Initialize a bitmap.
| inWidth | The width in pixels. | |
| inHeight | The heigth in pixels. |
Referenced by PackedBitmap().
| size_t Celartem::DjVu::PackedBitmap::getHeight | ( | ) | const [inline] |
Get the height in pixels.
| const u8* Celartem::DjVu::PackedBitmap::getPtr | ( | ) | const [inline] |
Get the pointer to the (0,0) pixel.
| u8* Celartem::DjVu::PackedBitmap::getPtr | ( | ) | [inline] |
Get the pointer to the (0,0) pixel.
| ssize_t Celartem::DjVu::PackedBitmap::getRowStride | ( | ) | const [inline] |
Get the row-stride (bytes-to-the-next-line) in bytes.
| size_t Celartem::DjVu::PackedBitmap::getWidth | ( | ) | const [inline] |
Get the width in pixels.
| bool Celartem::DjVu::PackedBitmap::isIdentical | ( | const PackedBitmap & | inBitmap | ) | const |
Compare two instances.
| inBitmap | A PackedBitmap instance to compare with. |
true if two instances are identical; otherwise false. | void Celartem::DjVu::PackedBitmap::swap | ( | PackedBitmap & | ioBitmap | ) | [inline] |
Swap this one with the specified one.
| ioBitmap | An instance to swap with. |
| void Celartem::DjVu::PackedBitmap::zeroClear | ( | ) | [inline] |
Zero-clear the buffer.
Referenced by PackedBitmap().