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 SaveToFileBMP(const char *pFileName) const
bool SaveToFile(const char *pFileName) const
Saves an image to a file.
bool LoadFromFileBMP(const char *pFileName)
bool SaveToFilePNM(const char *pFileName) const
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 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.
bool IsCompatible(const CByteImage *pImage) const
Checks whether two images are compatible or not.
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.
ImageType type
The type of the image.