54 #ifndef __BYTE_IMAGE_H__ 55 #define __BYTE_IMAGE_H__ 120 CByteImage(
int nImageWidth,
int nImageHeight,
ImageType imageType,
bool bHeaderOnly =
false);
172 void Set(
int nImageWidth,
int nImageHeight,
ImageType imageType,
bool bHeaderOnly =
false);
bool IsCompatible(const CByteImage *pImage) const
Checks whether two images are compatible or not.
bool LoadFromFileBMP(const char *pFileName)
int width
The width of the image in pixels.
GLenum GLsizei GLenum GLenum const GLvoid * image
~CByteImage()
The destructor.
bool LoadFromFile(const char *pFileName)
Loads an image from a file.
Data structure for the representation of 8-bit grayscale images and 24-bit RGB (or HSV) color images ...
void Set(int nImageWidth, int nImageHeight, ImageType imageType, bool bHeaderOnly=false)
Changes size and type of an image.
bool SaveToFileBMP(const char *pFileName) const
bool m_bOwnMemory
Flag signaling if memory is to be freed or not.
unsigned char * pixels
The pointer to the the pixels.
bool LoadFromFilePNM(const char *pFileName)
CByteImage()
The default constructor.
int height
The height of the image in pixels.
int bytesPerPixel
The number of bytes used for encoding one pixel.
ImageType
Enum specifying the supported image types.
bool SaveToFile(const char *pFileName) const
Saves an image to a file.
ImageType type
The type of the image.
bool SaveToFilePNM(const char *pFileName) const