00001 /* 00002 /-------------------------------------------------------------------- 00003 | 00004 | $Id: plfilterintensity_8h-source.html,v 1.4 2004/09/15 15:26:29 uzadow Exp $ 00005 | 00006 | Copyright (c) 1996-2002 Ulrich von Zadow 00007 | 00008 \-------------------------------------------------------------------- 00009 */ 00010 00011 #if !defined(INCL_PLFILTERINTENSITY) 00012 #define INCL_PLFILTERINTENSITY 00013 00014 #if _MSC_VER > 1000 00015 #pragma once 00016 #endif // _MSC_VER > 1000 00017 00018 #include "plfilter.h" 00019 #include "plpaintlibdefs.h" 00020 00021 class PLBmp; 00022 00023 //! Changes the intensity of a 24 or 32 bpp bitmap. 00024 //! Applies the factor intensityFactor = 1.0 + csupp * pow((v-m_offset), m_exponent) 00025 //! with csupp = intensity/pow(255.0, m_exponent); 00026 //! on the v-Value of the image after a HSV transform. 00027 //! The bitmap stays unchanged for intensity = 20, offset = 128, exponent = 1. 00028 class PLFilterIntensity : public PLFilter 00029 { 00030 public: 00031 PLFilterIntensity (double intensity, PLBYTE offset, double exponent); 00032 virtual ~PLFilterIntensity(); 00033 virtual void Apply(PLBmpBase *pBmpSource, PLBmp* pBmpDest) const; 00034 00035 protected: 00036 double m_intensity; 00037 double m_offset; 00038 double m_exponent; 00039 }; 00040 #endif 00041 00042 /* 00043 /-------------------------------------------------------------------- 00044 | 00045 | $Log: plfilterintensity_8h-source.html,v $ 00045 | Revision 1.4 2004/09/15 15:26:29 uzadow 00045 | Linux compatibility changes, doc update. 00045 | 00046 | Revision 1.5 2004/06/15 10:26:13 uzadow 00047 | Initial nonfunctioning version of plbmpbase. 00048 | 00049 | Revision 1.4 2004/06/06 12:56:38 uzadow 00050 | Doxygenified documentation. 00051 | 00052 | Revision 1.3 2002/02/24 13:00:47 uzadow 00053 | Documentation update; removed buggy PLFilterRotate. 00054 | 00055 | Revision 1.2 2001/10/06 22:03:26 uzadow 00056 | Added PL prefix to basic data types. 00057 | 00058 | Revision 1.1 2001/09/16 19:03:23 uzadow 00059 | Added global name prefix PL, changed most filenames. 00060 | 00061 | Revision 1.2 2001/01/15 15:05:31 uzadow 00062 | Added PLBmp::ApplyFilter() and PLBmp::CreateFilteredCopy() 00063 | 00064 | Revision 1.1 2000/11/06 23:20:22 uzadow 00065 | Added Contrast, Intensity and Lightness filters by 00066 | Thomas Hirschmann 00067 | 00068 | 00069 \-------------------------------------------------------------------- 00070 */