summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/bitmap3.cxx
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2018-04-18 07:51:50 +1000
committerTomaž Vajngerl <quikee@gmail.com>2018-04-20 08:31:36 +0200
commitf9473a8d2ea6740d325ac35da74fec16476820f0 (patch)
treedfa03ab618b43b5de62b965ffd5c029ef507ce40 /vcl/source/gdi/bitmap3.cxx
parentd4a01820ae094ef2d4ec2196334120600b1c9621 (diff)
vcl: ImplSeparableBlurFilter() -> BitmapGaussianSeparableBlurFilter
Change-Id: I996c9fcb0524e14e0093142be0749f0e5836426b Reviewed-on: https://gerrit.libreoffice.org/53071 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl/source/gdi/bitmap3.cxx')
-rw-r--r--vcl/source/gdi/bitmap3.cxx52
1 files changed, 0 insertions, 52 deletions
diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx
index b553130c6538..3bf068c3444a 100644
--- a/vcl/source/gdi/bitmap3.cxx
+++ b/vcl/source/gdi/bitmap3.cxx
@@ -1854,56 +1854,4 @@ bool Bitmap::Adjust( short nLuminancePercent, short nContrastPercent,
return bRet;
}
-bool Bitmap::ImplConvolutionPass(Bitmap& aNewBitmap, BitmapReadAccess const * pReadAcc, int aNumberOfContributions, const double* pWeights, int const * pPixels, const int* pCount)
-{
- if (!pReadAcc)
- return false;
-
- BitmapScopedWriteAccess pWriteAcc(aNewBitmap);
- if (!pWriteAcc)
- return false;
-
- const int nHeight = GetSizePixel().Height();
- assert(GetSizePixel().Height() == aNewBitmap.GetSizePixel().Width());
- const int nWidth = GetSizePixel().Width();
- assert(GetSizePixel().Width() == aNewBitmap.GetSizePixel().Height());
-
- BitmapColor aColor;
- double aValueRed, aValueGreen, aValueBlue;
- double aSum, aWeight;
- int aBaseIndex, aIndex;
-
- for (int nSourceY = 0; nSourceY < nHeight; ++nSourceY)
- {
- for (int nSourceX = 0; nSourceX < nWidth; ++nSourceX)
- {
- aBaseIndex = nSourceX * aNumberOfContributions;
- aSum = aValueRed = aValueGreen = aValueBlue = 0.0;
-
- for (int j = 0; j < pCount[nSourceX]; ++j)
- {
- aIndex = aBaseIndex + j;
- aSum += aWeight = pWeights[ aIndex ];
-
- aColor = pReadAcc->GetColor(nSourceY, pPixels[aIndex]);
-
- aValueRed += aWeight * aColor.GetRed();
- aValueGreen += aWeight * aColor.GetGreen();
- aValueBlue += aWeight * aColor.GetBlue();
- }
-
- BitmapColor aResultColor(
- static_cast<sal_uInt8>(MinMax( aValueRed / aSum, 0, 255 )),
- static_cast<sal_uInt8>(MinMax( aValueGreen / aSum, 0, 255 )),
- static_cast<sal_uInt8>(MinMax( aValueBlue / aSum, 0, 255 )) );
-
- int nDestX = nSourceY;
- int nDestY = nSourceX;
-
- pWriteAcc->SetPixel(nDestY, nDestX, aResultColor);
- }
- }
- return true;
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */