14 #include "BMPheader.h" 54 struct BITMAPINFOHEADER
70 struct BITMAPFILEHEADER
223 void AllocateRaster ();
225 kkint32 BMIcolorArraySize (BITMAPINFOHEADER& _bmh);
227 PalletBuilderPtr BuildPalletFromRasterData ();
229 void CleanUpMemory ();
231 void Load1BitColor (FILE* inFile,
235 void Load4BitColor (FILE* inFile,
239 void Load4BitColorCompressed (FILE* inFile,
243 void Load8BitColor (FILE* inFile,
247 void Load8BitColorCompressed (FILE* inFile,
251 void Load24BitColor (FILE* inFile,
255 bool ReversedGrayscaleImage ();
257 void SaveGrayScale (FILE* outFile);
259 void SaveColor (FILE* outFile);
261 void SaveColorCompressed256 (PalletBuilderPtr palletBuilder,
265 void SaveColor24BPP (FILE* outFile);
267 void SetUp4BitPallet ();
269 void SetUp8BitPallet ();
271 void SetUp16BitPallet (RGBQUAD* palette);
273 void SetUp256BitPalette (RGBQUAD* palette);
277 BITMAPFILEHEADER hdr;
278 BITMAPINFOHEADER bmh;
bool Color() const
Returns true if a Color image.
bool AreThereEdgePixels()
void ReAllocateForBiggerScreen()
Used to expand dimensions of image by 6 pixels so as to make sure that no image is along the edge...
A class that is used by to represent a single image in memory.
void SaveGrayscaleInverted8Bit(const KKStr &_fileName)
Saves image using compressed gray-scale where Background = 255 and foreground = 0.
This object is used to help encode the data stored in BMPImage::image into 8 or 4 bit compressed form...
const KKStr & FileName() const
const uchar * RedRow(kkint32 row) const
Returns the specified Row from the Red Channel.
unsigned __int32 kkuint32
const uchar * ImageRow(kkint32 row) const
Returns the specified Row from the Green Channel.
BmpImage(const Raster &raster)
Constructs a BMPImage instance from a Raster image; this is one way to save a Raster image to disk...
uchar & Pixel(kkint32 row, kkint32 col)
PixelValue * PixelValuePtr
Used to encode and decode BMP Images.
BmpImage(kkint32 _height, kkint32 _width, kkint32 _numOfColors)
void SaveGrayscaleInverted4Bit(const KKStr &_fileName)
Saves image using 4 bit compressed gray-scale where Background = 255 and foreground = 0...
unsigned char uchar
Unsigned character.
static KKStr Concat(const std::vector< std::string > &values)
Concatenates the list of 'std::string' strings.
void EliminateVerticalLines()
void Save(const KKStr &fileName)
const uchar * BlueRow(kkint32 row) const
Returns the specified Row from the Blue Channel.
void SetPaletteEntry(kkint32 palletIndex, const PixelValue &pixValue)
void InitializeFields(kkint32 _height, kkint32 _width)
void AddPixel(kkuint32 row, kkuint32 col, uchar pixValue)
void SetPixelValue(kkint32 row, kkint32 col, kkint32 pixel)
Will set the pixel value of the specified row and col to 'pixel'.
uchar ** Image()
Returns back two dimension matrix of image; if color it will be the green channel.
bool FourBitUncompressed()
BmpImage(const KKStr &_fileName, bool &successful)
Constructs a BMP image from the file specified by '_fileName'.
Used by the Raster Class to represent the contents of one pixel.