34 if (rSize.
getWidth() > std::numeric_limits<sal_Int32>::max() || rSize.
getWidth() < 0)
35 throw std::bad_alloc();
36 if (rSize.
getHeight() > std::numeric_limits<sal_Int32>::max() || rSize.
getHeight() < 0)
37 throw std::bad_alloc();
38 sal_Int32 nRowSize, nDataSize;
40 || o3tl::checked_multiply<sal_Int32>(nRowSize, rSize.
getHeight(), nDataSize)
43 throw std::bad_alloc();
58 assert(mnBitCount == 32);
66 return Color(mpData[
p], mpData[
p + 1], mpData[
p + 2]);
geometry::RealSize2D maSize
sal_uInt8 GetBlue() const
sal_uInt8 GetAlpha() const
sal_uInt8 GetGreen() const
constexpr tools::Long getHeight() const
constexpr tools::Long getWidth() const
Intended to be used to feed into CreateFromData to create a BitmapEx.
void SetAlpha(tools::Long nY, tools::Long nX, sal_uInt8 nAlpha)
sal_uInt8 GetBitCount() const
void SetPixel(tools::Long nY, tools::Long nX, Color nColor)
Color GetPixel(tools::Long nY, tools::Long nX) const
tools::Long Height() const
std::unique_ptr< sal_uInt8[]> mpData
tools::Long Width() const
RawBitmap(Size const &rSize, sal_uInt8 nBitCount)
void SetPixel(tools::Long nY, tools::Long nX, BitmapColor nColor)=delete
BitmapEx CreateFromData(sal_uInt8 const *pData, sal_Int32 nWidth, sal_Int32 nHeight, sal_Int32 nStride, sal_Int8 nBitCount, bool bReversColors, bool bReverseAlpha)
Copy block of image data into the bitmap.