summaryrefslogtreecommitdiff
path: root/vcl/inc/vcl/bitmap.hxx
diff options
context:
space:
mode:
authorTomaž Vajngerl <quikee@gmail.com>2012-06-15 07:22:32 +0200
committerTomaž Vajngerl <quikee@gmail.com>2012-06-16 00:39:07 +0200
commit05363527d84119c6759cdd638c76b041f2aa67b7 (patch)
tree1f82106d45dced0e92c748f7a5dddb127e6f40b8 /vcl/inc/vcl/bitmap.hxx
parentc02dd533f5a21b8386b6cfe8fdd9e3f83e7cbc7b (diff)
Separable Gaussian Blur and Unsharpen Mask filter.
Currently implemented Gaussian Blur filter uses a static matrix which means that the filter can not be parameterized. The new implementation of Gaussian Blur filter and accepts a blur radius as a parameter so the user can change the strength of the blur. For this the blur matrix is generated at each call. The new Blur implementation reuses separable convolution from Lanzcos rescale. For negative values of radius the Bitmap will be sharpened. For this an Unsharpen Mask filter is used, which is actually a blurred image substracted from the original image.
Diffstat (limited to 'vcl/inc/vcl/bitmap.hxx')
-rw-r--r--vcl/inc/vcl/bitmap.hxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/vcl/inc/vcl/bitmap.hxx b/vcl/inc/vcl/bitmap.hxx
index 7e6cf3aeb4c9..dc354cfb96c2 100644
--- a/vcl/inc/vcl/bitmap.hxx
+++ b/vcl/inc/vcl/bitmap.hxx
@@ -183,6 +183,7 @@ private:
{
sal_uInt16 mnSepiaPercent;
sal_uInt8 mcSolarGreyThreshold;
+ double mnRadius;
MosaicTileSize maMosaicTileSize;
EmbossAngles maEmbossAngles;
@@ -197,6 +198,10 @@ public:
meFilter( BMP_FILTER_SOLARIZE ), mnProgressStart( nProgressStart ), mnProgressEnd( nProgressEnd ),
mcSolarGreyThreshold( cSolarGreyThreshold ) {}
+ BmpFilterParam( double nRadius, sal_uLong nProgressStart = 0, sal_uLong nProgressEnd = 0 ) :
+ meFilter( BMP_FILTER_SMOOTH ), mnProgressStart( nProgressStart ), mnProgressEnd( nProgressEnd ),
+ mnRadius( cSolarGreyThreshold ) {}
+
BmpFilterParam( sal_uInt16 nSepiaPercent, sal_uLong nProgressStart = 0, sal_uLong nProgressEnd = 0 ) :
meFilter( BMP_FILTER_SEPIA ), mnProgressStart( nProgressStart ), mnProgressEnd( nProgressEnd ),
mnSepiaPercent( nSepiaPercent ) {}
@@ -397,6 +402,10 @@ public:
SAL_DLLPRIVATE sal_Bool ImplMosaic( const BmpFilterParam* pFilterParam, const Link* pProgress );
SAL_DLLPRIVATE sal_Bool ImplPopArt( const BmpFilterParam* pFilterParam, const Link* pProgress );
+ SAL_DLLPRIVATE bool ImplSeparableBlurFilter( const double aRadius = 0.7 );
+ SAL_DLLPRIVATE bool ImplSeparableUnsharpenFilter( const double aRadius = 0.7 );
+ SAL_DLLPRIVATE void ImplBlurContributions( const int aSize, const int aNumberOfContributions,
+ double* pBlurVector, double*& pWeights, int*& pPixels, int*& pCount );
public:
Bitmap();