Bugzilla – Attachment 44850 Details for
Bug 33455
1bit PNGs rendered in black and white
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
proposed fix
onebit.pngs.withpalette.patch (text/plain), 1.37 KB, created by
Caolán McNamara
on 2011-03-25 07:52:45 UTC
(
hide
)
Description:
proposed fix
Filename:
MIME Type:
Creator:
Caolán McNamara
Created:
2011-03-25 07:52:45 UTC
Size:
1.37 KB
patch
obsolete
>diff --git a/vcl/unx/source/gdi/salgdi2.cxx b/vcl/unx/source/gdi/salgdi2.cxx >index 8e444ad..3cf4ba1 100644 >--- a/vcl/unx/source/gdi/salgdi2.cxx >+++ b/vcl/unx/source/gdi/salgdi2.cxx >@@ -44,6 +44,7 @@ > #include "vcl/salbtype.hxx" > #include "vcl/printergfx.hxx" > #include "vcl/bmpacc.hxx" >+#include "vcl/outdata.hxx" > > #undef SALGDI2_TESTTRANS > >@@ -627,7 +628,22 @@ void X11SalGraphics::drawBitmap( const SalTwoRect* pPosAry, const SalBitmap& rSa > { > // set foreground/background values for 1Bit bitmaps > XGetGCValues( pXDisp, aGC, nValues, &aOldVal ); >- aNewVal.foreground = rColMap.GetWhitePixel(), aNewVal.background = rColMap.GetBlackPixel(); >+ >+ aNewVal.foreground = rColMap.GetWhitePixel(); >+ aNewVal.background = rColMap.GetBlackPixel(); >+ >+ //fdo#33455 handle 1 bit depth pngs with palette entries >+ //to set fore/back colors >+ if (const BitmapBuffer* pBitmapBuffer = const_cast<SalBitmap&>(rSalBitmap).AcquireBuffer(true)) >+ { >+ const BitmapPalette& rPalette = pBitmapBuffer->maPalette; >+ if (rPalette.GetEntryCount() == 2) >+ { >+ aNewVal.foreground = rColMap.GetPixel(ImplColorToSal(rPalette[0])); >+ aNewVal.background = rColMap.GetPixel(ImplColorToSal(rPalette[1])); >+ } >+ } >+ > XChangeGC( pXDisp, aGC, nValues, &aNewVal ); > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 33455
:
42442
|
42444
| 44850 |
44851