#include <plfiltercontrast.h>
Inheritance diagram for PLFilterContrast:
Public Member Functions | |
PLFilterContrast (double contrast, PLBYTE offset) | |
contrast is the slope of the function. | |
virtual | ~PLFilterContrast () |
virtual void | Apply (PLBmp *pBmpSource, PLBmp *pBmpDest) const |
Applies the Filter to pBmpSource and stores the result in pBmpDest. | |
Protected Attributes | |
double | m_contrast |
double | m_offset |
The zero point (i. e., the intensity that is neither enhanced nor reduced) has to be provided. (A Contrast filter is defined in the following way: It lowers all intensity values below a given threshold, and it raises them beyond. Most applications position the threshold at 50 . This does not always yield the best results, especially if you have an unbalanced dark/light ratio of pixels. The best you can do here is play around with the threshold.) Works for 24 and 32 bpp bitmaps.
Definition at line 33 of file plfiltercontrast.h.
|
contrast is the slope of the function. offset is the intensity at which the color stays the same. Above this value, intensities are increased. Below it, they are reduced. With offset 128 and contrast 1, the image stays unchanged. Definition at line 16 of file plfiltercontrast.cpp. References PLBYTE. |
|
Definition at line 23 of file plfiltercontrast.cpp. |
|
Applies the Filter to pBmpSource and stores the result in pBmpDest. The base-class version copies the bitmap before calling ApplyInPlace (pBmpDest). Reimplemented from PLFilter. Definition at line 28 of file plfiltercontrast.cpp. References PLBmp::Create(), PLBmp::GetBitsPerPixel(), PLBmp::GetHeight(), PLBmp::GetLineArray(), PLBmp::GetResolution(), PLBmp::GetWidth(), PLBmp::HasAlpha(), m_offset, PLASSERT, and PLBYTE. |
Here is the call graph for this function:
|
Definition at line 46 of file plfiltercontrast.h. |
|
Definition at line 47 of file plfiltercontrast.h. Referenced by Apply(). |