25 std::optional<Bitmap> pNewBmp;
37 pWriteAcc = pNewBmp->AcquireWriteAccess();
40 bool bConditionsMet =
false;
43 if (pReadAcc && pWriteAcc)
45 nWidth = pReadAcc->
Width();
46 nHeight = pReadAcc->
Height();
47 bConditionsMet = (nWidth > 0 && nHeight > 0);
53 sal_Int32 nX, nY, nX1, nX2, nY1, nY2, nSumR, nSumG, nSumB;
70 fArea_1 = 1.0 / ((nX2 - nX1 + 1) * (nY2 - nY1 + 1));
76 for (nY = nY1, nSumR = nSumG = nSumB = 0; nY <= nY2; nY++)
79 for (nX = nX1; nX <= nX2; nX++)
92 for (nY = nY1; nY <= nY2; nY++)
95 for (nX = nX1; nX <= nX2; nX++)
105 fArea_1 = 1.0 / ((nX2 - nX1 + 1) * (nY2 - nY1 + 1));
107 }
while (nX1 < nWidth);
113 for (nY = nY1, nSumR = nSumG = nSumB = 0; nY <= nY2; nY++)
116 for (nX = nX1; nX <= nX2; nX++)
130 for (nY = nY1; nY <= nY2; nY++)
133 for (nX = nX1; nX <= nX2; nX++)
143 fArea_1 = 1.0 / ((nX2 - nX1 + 1) * (nY2 - nY1 + 1));
145 }
while (nX1 < nWidth);
154 }
while (nY1 < nHeight);
159 if (pWriteAcc == pReadAcc)
Bitmap GetBitmap(Color aTransparentReplaceColor) const
tools::Long Height() const
tools::Long Width() const
const BitmapColor & GetPaletteColor(sal_uInt16 nColor) const
virtual BitmapEx execute(BitmapEx const &rBitmapEx) const override
void SetPixelOnData(sal_uInt8 *pData, tools::Long nX, const BitmapColor &rBitmapColor)
BitmapColor GetPixelFromData(const sal_uInt8 *pData, tools::Long nX) const
sal_uInt8 GetIndexFromData(const sal_uInt8 *pData, tools::Long nX) const
Scanline GetScanline(tools::Long nY) const
void SetPrefMapMode(const MapMode &rMapMode)
BitmapWriteAccess * AcquireWriteAccess()
const MapMode & GetPrefMapMode() const
Size GetSizePixel() const
static void ReleaseAccess(BitmapInfoAccess *pAccess)
BitmapReadAccess * AcquireReadAccess()
void SetPrefSize(const Size &rSize)
const Size & GetPrefSize() const
vcl::PixelFormat getPixelFormat() const
sal_uInt8 GetBlue() const
void SetGreen(sal_uInt8 nGreen)
void SetRed(sal_uInt8 nRed)
sal_uInt8 GetGreen() const
void SetBlue(sal_uInt8 nBlue)
constexpr bool isPalettePixelFormat(PixelFormat ePixelFormat)
Is it a pixel format that forces creation of a palette.
HashMap_OWString_Interface aMap