88 ImageBase(
int imWidth,
int imHeight,
bool isColor);
157 void load(
char *filename);
166 bool save(
char *filename);
This class is a base class for images. It provides some basic functionalities for images.
Definition ImageBase.hpp:21
unsigned char * operator[](int l)
Overloaded operator[] to access the image data.
Definition ImageBase.cpp:211
int getValidity()
Gets the validity flag of the image.
Definition ImageBase.hpp:136
bool color
Definition ImageBase.hpp:41
ImageBase * getPlan(PLAN plan)
Gets a specific color plane of the image.
Definition ImageBase.cpp:157
bool save(char *filename)
Saves the image to a file.
Definition ImageBase.cpp:141
image_ppm img_ppm
Definition ImageBase.hpp:48
bool getColor()
Gets the color flag of the image.
Definition ImageBase.hpp:143
image_pgm img_pgm
Definition ImageBase.hpp:47
double * dataD
Definition ImageBase.hpp:39
unsigned char * data
Definition ImageBase.hpp:38
PLAN
Enumeration for the color planes of an image.
Definition ImageBase.hpp:30
@ PLAN_B
Definition ImageBase.hpp:33
@ PLAN_G
Definition ImageBase.hpp:32
@ PLAN_R
Definition ImageBase.hpp:31
void init()
Initializes the image object.
Definition ImageBase.cpp:72
void reset()
Resets the image object.
Definition ImageBase.cpp:86
bool isValid
Definition ImageBase.hpp:45
ImageBase(void)
Default constructor for the ImageBase class.
Definition ImageBase.cpp:18
~ImageBase(void)
Destructor for the ImageBase class.
Definition ImageBase.cpp:67
int nTaille
Definition ImageBase.hpp:44
int getWidth()
Gets the width of the image.
Definition ImageBase.hpp:121
int width
Definition ImageBase.hpp:43
int getTotalSize()
Gets the total size of the image data.
Definition ImageBase.hpp:129
int height
Definition ImageBase.hpp:42
void load(char *filename)
Loads an image from a file.
Definition ImageBase.cpp:96
int getHeight()
Gets the height of the image.
Definition ImageBase.hpp:114
void copy(const ImageBase ©)
Copies the data from another ImageBase object.
Definition ImageBase.cpp:184
unsigned char * getData()
Gets the pointer to the image data in unsigned char format.
Definition ImageBase.hpp:150
The image_pgm class provides methods to read and write PGM images with various bit depths.
Definition image_pgm.hpp:30
This class represents a PPM image and provides methods to read and write PPM images,...
Definition image_ppm.hpp:31
This file contains the declaration of the image_pgm class, which is used to read and write PGM images...
This header file defines the image_ppm class, which is derived from image_portable.