LibreOffice Module vcl (master) 1
|
#include <BitmapMonochromeFilter.hxx>
Public Member Functions | |
BitmapMonochromeFilter (sal_uInt8 cThreshold) | |
Convert to 2 color bitmap. More... | |
virtual BitmapEx | execute (BitmapEx const &rBitmapEx) const override |
Public Member Functions inherited from BitmapFilter | |
BitmapFilter () | |
virtual | ~BitmapFilter () |
virtual BitmapEx | execute (BitmapEx const &rBitmapEx) const =0 |
Private Attributes | |
sal_uInt8 | mcThreshold |
Additional Inherited Members | |
Static Public Member Functions inherited from BitmapFilter | |
static bool | Filter (BitmapEx &rBmpEx, BitmapFilter const &rFilter) |
static bool | Filter (Animation &rBmpEx, BitmapFilter const &rFilter) |
Definition at line 16 of file BitmapMonochromeFilter.hxx.
|
inline |
Convert to 2 color bitmap.
Converts to a 2 color indexed bitmap - note that we don't change to black and white monochrome, but we pick the closest color to black and white in the bitmap.
cThreshold | Luminance value that determines whether the colour should be black (or closest color to black) or white (or closest color to white). |
Definition at line 30 of file BitmapMonochromeFilter.hxx.
Implements BitmapFilter.
Definition at line 17 of file BitmapMonochromeFilter.cxx.
References aMap, COL_BLACK(), COL_WHITE(), BitmapEx::GetBitmap(), Bitmap::GetGreyPalette(), BitmapReadAccess::GetIndexFromData(), Color::GetLuminance(), BitmapInfoAccess::GetPaletteColor(), BitmapReadAccess::GetPixelFromData(), Bitmap::GetPrefMapMode(), Bitmap::GetPrefSize(), BitmapReadAccess::GetScanline(), Bitmap::GetSizePixel(), BitmapInfoAccess::HasPalette(), mcThreshold, vcl::N8_BPP, vcl::ScopedBitmapAccess< Access, Bitmap, Acquire >::reset(), Bitmap::SetPrefMapMode(), and Bitmap::SetPrefSize().
|
private |
Definition at line 38 of file BitmapMonochromeFilter.hxx.
Referenced by execute().