drawinglayer/source/processor2d/vclhelperbufferdevice.cxx |    6 +--
 vcl/source/filter/egif/egif.cxx                           |   26 +++++++-------
 2 files changed, 16 insertions(+), 16 deletions(-)

New commits:
commit a59ef851c35bc63151f776f2dbe2d2cda51153bf
Author:     Noel Grandin <[email protected]>
AuthorDate: Thu Sep 4 17:03:59 2025 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Thu Sep 4 20:20:13 2025 +0200

    BitmapEx->Bitmap in impBufferDevice
    
    now that Bitmap supports transparency
    
    Change-Id: I265d356e13c6cd8c1a34835e53b2386548cffb98
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190596
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <[email protected]>

diff --git a/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx 
b/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx
index 1e6cf9042d1b..d4ba0fd63af6 100644
--- a/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx
+++ b/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx
@@ -315,7 +315,7 @@ void doSpeedCompare(double fTrans, const Bitmap& rContent, 
const tools::Rectangl
         // "Former" method using a temporary AlphaMask & DrawBitmapEx
         sal_uInt8 nMaskValue(static_cast<sal_uInt8>(basegfx::fround(fTrans * 
255.0)));
         const AlphaMask aAlphaMask(aSizePixel, &nMaskValue);
-        rOutDev.DrawBitmapEx(rDestPixel.TopLeft(), BitmapEx(rContent, 
aAlphaMask));
+        rOutDev.DrawBitmapEx(rDestPixel.TopLeft(), Bitmap(rContent, 
aAlphaMask));
     }
 
     // get intermediate time
@@ -328,7 +328,7 @@ void doSpeedCompare(double fTrans, const Bitmap& rContent, 
const tools::Rectangl
         
rOutDev.DrawTransformedBitmapEx(basegfx::utils::createScaleTranslateB2DHomMatrix(
                                             aSizePixel.Width(), 
aSizePixel.Height(),
                                             rDestPixel.TopLeft().X(), 
rDestPixel.TopLeft().Y()),
-                                        BitmapEx(rContent), 1 - fTrans);
+                                        rContent, 1 - fTrans);
     }
 
     // get end time
@@ -375,7 +375,7 @@ void doSpeedCompare(double fTrans, const Bitmap& rContent, 
const tools::Rectangl
 #endif
 }
 
-// support for rendering Bitmap and BitmapEx contents
+// support for rendering Bitmap contents
 namespace drawinglayer
 {
 // static global VDev buffer for VclProcessor2D/VclPixelProcessor2D
commit 71712cf191e78c0cf5251460e8035143208b4bdd
Author:     Noel Grandin <[email protected]>
AuthorDate: Thu Sep 4 16:48:07 2025 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Thu Sep 4 20:20:03 2025 +0200

    BitmapEx->Bitmap in GIFWriter
    
    now that Bitmap supports transparency
    
    Change-Id: I89310929e8b6d1cfceed6ba3242e8328816b9e8b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190595
    Reviewed-by: Noel Grandin <[email protected]>
    Tested-by: Jenkins

diff --git a/vcl/source/filter/egif/egif.cxx b/vcl/source/filter/egif/egif.cxx
index 9000c8a526dc..17c60288163c 100644
--- a/vcl/source/filter/egif/egif.cxx
+++ b/vcl/source/filter/egif/egif.cxx
@@ -56,11 +56,11 @@ class GIFWriter
     void                WriteAccess();
     void                WriteTerminator();
 
-    bool                CreateAccess( const BitmapEx& rBmpEx );
+    bool                CreateAccess( const Bitmap& rBmp );
     void                DestroyAccess();
 
     void                WriteAnimation( const Animation& rAnimation );
-    void                WriteBitmapEx( const BitmapEx& rBmpEx, const Point& 
rPoint, bool bExtended,
+    void                WriteBitmap( const Bitmap& rBmp, const Point& rPoint, 
bool bExtended,
                                        tools::Long nTimer = 0, Disposal 
eDisposal = Disposal::Not );
 
     css::uno::Reference< css::task::XStatusIndicator > xStatusIndicator;
@@ -139,7 +139,7 @@ bool GIFWriter::WriteGIF(const Graphic& rGraphic, 
FilterConfigItem* pFilterConfi
     {
         const bool bGrafTrans = rGraphic.IsTransparent();
 
-        BitmapEx aBmpEx(rGraphic.GetBitmap());
+        Bitmap aBmp(rGraphic.GetBitmap());
 
         nMinPercent = 0;
         nMaxPercent = 100;
@@ -148,10 +148,10 @@ bool GIFWriter::WriteGIF(const Graphic& rGraphic, 
FilterConfigItem* pFilterConfi
 
         if( bStatus )
         {
-            WriteGlobalHeader( aBmpEx.GetSizePixel() );
+            WriteGlobalHeader( aBmp.GetSizePixel() );
 
             if( bStatus )
-                WriteBitmapEx( aBmpEx, Point(), bGrafTrans );
+                WriteBitmap( aBmp, Point(), bGrafTrans );
         }
     }
 
@@ -170,10 +170,10 @@ bool GIFWriter::WriteGIF(const Graphic& rGraphic, 
FilterConfigItem* pFilterConfi
 }
 
 
-void GIFWriter::WriteBitmapEx( const BitmapEx& rBmpEx, const Point& rPoint,
+void GIFWriter::WriteBitmap( const Bitmap& rBmp, const Point& rPoint,
                                bool bExtended, tools::Long nTimer, Disposal 
eDisposal )
 {
-    if( !CreateAccess( rBmpEx ) )
+    if( !CreateAccess( rBmp ) )
         return;
 
     nActX = rPoint.X();
@@ -215,7 +215,7 @@ void GIFWriter::WriteAnimation( const Animation& rAnimation 
)
     {
         const AnimationFrame& rAnimationFrame = rAnimation.Get( i );
 
-        WriteBitmapEx(BitmapEx(rAnimationFrame.maBitmap), 
rAnimationFrame.maPositionPixel, true,
+        WriteBitmap(rAnimationFrame.maBitmap, rAnimationFrame.maPositionPixel, 
true,
                        rAnimationFrame.mnWait, rAnimationFrame.meDisposal );
         nMinPercent = nMaxPercent;
         nMaxPercent = static_cast<sal_uInt32>(nMaxPercent + fStep);
@@ -237,17 +237,17 @@ void GIFWriter::MayCallback(sal_uInt32 nPercent)
 }
 
 
-bool GIFWriter::CreateAccess( const BitmapEx& rBmpEx )
+bool GIFWriter::CreateAccess( const Bitmap& rBmp )
 {
     if( bStatus )
     {
-        AlphaMask aMask( rBmpEx.GetAlphaMask() );
-
-        aAccBmp = rBmpEx.GetBitmap();
+        aAccBmp = rBmp.CreateColorBitmap();
         bTransparent = false;
 
-        if( !aMask.IsEmpty() )
+        if( rBmp.HasAlpha() )
         {
+            AlphaMask aMask( rBmp.CreateAlphaMask() );
+
             if( aAccBmp.Convert( BmpConversion::N8BitTrans ) )
             {
                 aMask.Convert( BmpConversion::N1BitThreshold );

Reply via email to