
Classes | |
| struct | RecIJB |
| Structure that represents the IBJ bimaps. More... | |
Public Member Functions | |
| IJB (void) | |
| Empty constructor. More... | |
| ~IJB (void) | |
| Destructor. More... | |
| IJB (const IJB &rhs) | |
| IJB & | operator= (const IJB &rhs) |
| IJB & | load (const File &filename) |
| Load the given .ijb file. More... | |
| std::string | summary (void) const |
| Summarize the .ijb as a text message for the user. More... | |
| Image | extract_image () const |
| Extract the image data from contents, and re-build a new user-viewable image. More... | |
| IJB & | set_new_image (const Image &new_image) |
| IJB & | rotate_image_180 (void) |
| const IJB & | create_browseable_image (const bool force=false) const |
Create a PNG file in the same directory as the IJB, and name it so it is obvious which image corresponds with each .ijb. More... | |
Public Attributes | |
| VBytes | contents |
| The entire contents of the file is loaded into this vector. More... | |
| const RecIJB * | rec |
Pointer to the bitmap record. Should point to nullptr or the first byte of contents. More... | |
| File | file |
| .ijb file. More... | |
| Image | img |
| The image file extracted, rotated, and flipped from the .ijb file. More... | |
| IJB::IJB | ( | void | ) |
| IJB::~IJB | ( | void | ) |
| IJB & IJB::load | ( | const File & | filename | ) |
Load the given .ijb file.
| Lox::Exception | if the file does not exist |
| Lox::Exception | if the file is impossibly small (no content?) |
| Lox::Exception | if the file cannot be opened (permission problem?) |
| Lox::Exception | if the file is not a valid .ijb bitmap |
| Lox::Exception | if the file has an invalid size (width, height, or length) |
References contents, extract_image(), file, IJB::RecIJB::height, img, IJB::RecIJB::len, rec, and IJB::RecIJB::width.
Referenced by SessionComponent::buttonClicked(), and PrintJob::load_ijb().


| std::string IJB::summary | ( | void | ) | const |
Summarize the .ijb as a text message for the user.
References contents, file, IJB::RecIJB::height, IJB::RecIJB::len, IJB::RecIJB::long_filename, rec, IJB::RecIJB::short_name, and IJB::RecIJB::width.
Referenced by PrintJob::load_ijb().

| Image IJB::extract_image | ( | ) | const |
Extract the image data from contents, and re-build a new user-viewable image.
Instead of calling this directly, see the image stored as img.
References IJB::RecIJB::data, IJB::RecIJB::height, rec, and IJB::RecIJB::width.
Referenced by load(), and ~IJB().

| IJB & IJB::set_new_image | ( | const Image & | new_image | ) |
| Lox::Exception | if the file cannot be replaced |
References contents, create_browseable_image(), file, IJB::RecIJB::height, img, rec, IJB::RecIJB::short_name, and IJB::RecIJB::width.
Referenced by SessionComponent::buttonClicked().


| const IJB & IJB::create_browseable_image | ( | const bool | force = false | ) | const |
Create a PNG file in the same directory as the IJB, and name it so it is obvious which image corresponds with each .ijb.
| force | Images are only written if they don't already on disk, unless true is passed in which forces the image to be re-written. |
References file, img, rec, and IJB::RecIJB::short_name.
Referenced by PrintJob::load_ijb(), and set_new_image().

| VBytes IJB::contents |
The entire contents of the file is loaded into this vector.
Referenced by load(), set_new_image(), summary(), and ~IJB().
| const RecIJB* IJB::rec |
Pointer to the bitmap record. Should point to nullptr or the first byte of contents.
Referenced by create_browseable_image(), SessionComponent::edit_description_field(), extract_image(), load(), SessionComponent::paintCell(), set_new_image(), summary(), and ~IJB().
| File IJB::file |
.ijb file.
Referenced by create_browseable_image(), load(), set_new_image(), summary(), and ~IJB().
| Image IJB::img |
The image file extracted, rotated, and flipped from the .ijb file.
This is automatically done by extract_image() when the .ibj file is first loaded in load().
Referenced by SessionComponent::buttonClicked(), create_browseable_image(), load(), SessionComponent::paintCell(), set_new_image(), and ~IJB().