/* /-------------------------------------------------------------------- | | $Id: plbitmap.cpp,v 1.24 2004/09/11 12:41:35 uzadow Exp $ | Device independent bitmap class | | Manipulates uncompressed device independent bitmaps | of all color depths. | | Copyright (c) 1996-2002 Ulrich von Zadow | \-------------------------------------------------------------------- */ #include "plbitmap.h" #include "plexcept.h" #include "plfilterquantize.h" #include using namespace std; // Creates an empty bitmap. // Derived classes have to create a small bitmap here so the // class can assume that a valid bitmap is available all the // time. PLBmp::PLBmp () { } PLBmp::~PLBmp () { } ///////////////////////////////////////////////////////////////////// // PLBmp creation void PLBmp::Create (PLLONG Width, PLLONG Height, const PLPixelFormat& pf, PLBYTE * pBits, int Stride, const PLPoint& Resolution) { PLASSERT_VALID (this); freeMembers (); internalCreate (Width, Height, pf); m_Resolution = Resolution; if (pBits) { if (Stride == 0) { Stride = Width*pf.GetBitsPerPixel()/8; } for (int y = 0; y