10#ifndef INCLUDED_VCL_BITMAP_TOOLS_HXX
11#define INCLUDED_VCL_BITMAP_TOOLS_HXX
13#include <config_cairo_canvas.h>
14#include <config_wasm_strip.h>
18#if ENABLE_CAIRO_CANVAS
26namespace basegfx {
class B2DHomMatrix; }
31#if !ENABLE_WASM_STRIP_PREMULTIPLY
54 sal_Int32 nWidth, sal_Int32 nHeight, sal_Int32 nStride,
56 bool bReversColors =
false,
bool bReverseAlpha =
false);
60#if ENABLE_CAIRO_CANVAS
65 const ::basegfx::B2DHomMatrix& rTransform,
struct _cairo_surface cairo_surface_t
Intended to be used to feed into CreateFromData to create a BitmapEx.
void CanvasCairoExtractBitmapData(BitmapEx const &aBmpEx, Bitmap &aBitmap, unsigned char *&data, bool &bHasAlpha, tools::Long &rnWidth, tools::Long &rnHeight)
bool isHistorical8x8(const BitmapEx &rBitmapEx, Color &o_rBack, Color &o_rFront)
BitmapEx loadFromName(const OUString &rFileName, const ImageLoadFlags eFlags)
lookup_table const & get_unpremultiply_table()
Bitmap GetDownsampledBitmap(Size const &rDstSizeTwip, Point const &rSrcPt, Size const &rSrcSz, Bitmap const &rBmp, tools::Long nMaxBmpDPIX, tools::Long nMaxBmpDPIY)
Retrieve downsampled and cropped bitmap.
BitmapEx CanvasTransformBitmap(const BitmapEx &rBitmap, const ::basegfx::B2DHomMatrix &rTransform, ::basegfx::B2DRectangle const &rDestRect, ::basegfx::B2DHomMatrix const &rLocalTransform)
void DrawAlphaBitmapAndAlphaGradient(BitmapEx &rBitmapEx, bool bFixedTransparence, float fTransparence, AlphaMask &rNewMask)
void loadFromSvg(SvStream &rStream, const OUString &sPath, BitmapEx &rBitmapEx, double fScalingFactor)
void DrawAndClipBitmap(const Point &rPos, const Size &rSize, const BitmapEx &rBitmap, BitmapEx &aBmpEx, basegfx::B2DPolyPolygon const &rClipPath)
sal_uInt8 unpremultiply(sal_uInt8 c, sal_uInt8 a)
BitmapEx createHistorical8x8FromArray(std::array< sal_uInt8, 64 > const &pArray, Color aColorPix, Color aColorBack)
sal_uInt8 premultiply(sal_uInt8 c, sal_uInt8 a)
css::uno::Sequence< sal_Int8 > GetMaskDIB(BitmapEx const &aBmpEx)
uno::Sequence< sal_Int8 > CanvasExtractBitmapData(BitmapEx const &rBitmapEx, const geometry::IntegerRectangle2D &rect)
lookup_table const & get_premultiply_table()
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.
std::array< std::array< sal_uInt8, 256 >, 256 > lookup_table
bool convertBitmap32To24Plus8(BitmapEx const &rInput, BitmapEx &rResult)