|
Code base obscuration (for images) 1.0
It implements different obscuration methods on portable images (.pgm and .ppm)
|
This class is a base class for images. It provides some basic functionalities for images. More...
#include <ImageBase.hpp>

Public Types | |
| enum | PLAN { PLAN_R , PLAN_G , PLAN_B } |
| Enumeration for the color planes of an image. More... | |
Public Member Functions | |
| ImageBase (void) | |
| Default constructor for the ImageBase class. | |
| ImageBase (const ImageBase &other) | |
| Copy constructor for the ImageBase class. | |
| ImageBase (int imWidth, int imHeight, bool isColor) | |
| Constructor for the ImageBase class with specified width, height, and color mode. | |
| ~ImageBase (void) | |
| Destructor for the ImageBase class. | |
| int | getHeight () |
| Gets the height of the image. | |
| int | getWidth () |
| Gets the width of the image. | |
| int | getTotalSize () |
| Gets the total size of the image data. | |
| int | getValidity () |
| Gets the validity flag of the image. | |
| bool | getColor () |
| Gets the color flag of the image. | |
| unsigned char * | getData () |
| Gets the pointer to the image data in unsigned char format. | |
| void | load (char *filename) |
| Loads an image from a file. | |
| bool | save (char *filename) |
| Saves the image to a file. | |
| ImageBase * | getPlan (PLAN plan) |
| Gets a specific color plane of the image. | |
| unsigned char * | operator[] (int l) |
| Overloaded operator[] to access the image data. | |
Protected Member Functions | |
| void | init () |
| Initializes the image object. | |
| void | reset () |
| Resets the image object. | |
| void | copy (const ImageBase ©) |
| Copies the data from another ImageBase object. | |
Protected Attributes | |
| unsigned char * | data |
| double * | dataD |
| bool | color |
| int | height |
| int | width |
| int | nTaille |
| bool | isValid |
| image_pgm | img_pgm |
| image_ppm | img_ppm |
This class is a base class for images. It provides some basic functionalities for images.
| enum ImageBase::PLAN |
| ImageBase::ImageBase | ( | void | ) |
Default constructor for the ImageBase class.
| ImageBase::ImageBase | ( | const ImageBase & | other | ) |
| ImageBase::ImageBase | ( | int | imWidth, |
| int | imHeight, | ||
| bool | isColor ) |
Constructor for the ImageBase class with specified width, height, and color mode.
| imWidth | The width of the image. |
| imHeight | The height of the image. |
| isColor | Flag indicating if the image is in color or not. |
| ImageBase::~ImageBase | ( | void | ) |
Destructor for the ImageBase class.
|
protected |
|
inline |
Gets the color flag of the image.
|
inline |
Gets the pointer to the image data in unsigned char format.
|
inline |
Gets the height of the image.
Gets a specific color plane of the image.
| plan | The color plane to get. |
|
inline |
Gets the total size of the image data.
|
inline |
Gets the validity flag of the image.
|
inline |
Gets the width of the image.
|
protected |
Initializes the image object.
| void ImageBase::load | ( | char * | filename | ) |
Loads an image from a file.
| filename | The name of the file to load. |
| unsigned char * ImageBase::operator[] | ( | int | l | ) |
Overloaded operator[] to access the image data.
| l | The index of the data to access. |
|
protected |
Resets the image object.
| bool ImageBase::save | ( | char * | filename | ) |
Saves the image to a file.
| filename | The name of the file to save. |
|
protected |
Flag indicating if the image is in color or not
|
protected |
Pointer to the image data in unsigned char format
|
protected |
Pointer to the image data in double format
|
protected |
Height of the image
|
protected |
Object for handling PGM images
|
protected |
Object for handling PPM images
|
protected |
Flag indicating if the image is valid or not
|
protected |
Total size of the image data
|
protected |
Width of the image