diff options
author | Oliver Bolte <obo@openoffice.org> | 2006-07-10 13:20:43 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2006-07-10 13:20:43 +0000 |
commit | af9b319d7558905d53e0faadc1672b4b70d323cf (patch) | |
tree | 80d6ce89b42644cc0d3650634cd776dc55a8ddda /vcl | |
parent | 0c6e1d6587bd5779f906486fccbc016cf94799a6 (diff) |
INTEGRATION: CWS bitcount01 (1.6.232); FILE MERGED
2006/04/07 09:15:14 hdu 1.6.232.1: #i63959# do not lie about bitcounts
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/win/source/gdi/salbmp.cxx | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/vcl/win/source/gdi/salbmp.cxx b/vcl/win/source/gdi/salbmp.cxx index 1db02b192234..2f5d1534068e 100644 --- a/vcl/win/source/gdi/salbmp.cxx +++ b/vcl/win/source/gdi/salbmp.cxx @@ -4,9 +4,9 @@ * * $RCSfile: salbmp.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: hr $ $Date: 2006-06-19 19:59:34 $ + * last change: $Author: obo $ $Date: 2006-07-10 14:20:43 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -222,13 +222,6 @@ bool WinSalBitmap::Create( const SalBitmap& rSSalBmp, SalGraphics* pSGraphics ) maSize = Size( aDDBInfo.bmWidth, aDDBInfo.bmHeight ); mnBitCount = aDDBInfo.bmPlanes * aDDBInfo.bmBitsPixel; - if( mnBitCount ) - { - mnBitCount = ( mnBitCount <= 1 ) ? 1 : - ( mnBitCount <= 4 ) ? 4 : - ( mnBitCount <= 8 ) ? 8 : 24; - } - bRet = TRUE; } else if( hNewDDB ) @@ -337,11 +330,11 @@ USHORT WinSalBitmap::ImplGetDIBColorCount( HGLOBAL hDIB ) HGLOBAL WinSalBitmap::ImplCreateDIB( const Size& rSize, USHORT nBits, const BitmapPalette& rPal ) { - DBG_ASSERT( nBits == 1 || nBits == 4 || nBits == 8 || nBits == 24, "Unsupported BitCount!" ); + DBG_ASSERT( nBits == 1 || nBits == 4 || nBits == 8 || nBits == 16 || nBits == 24, "Unsupported BitCount!" ); HGLOBAL hDIB = 0; - if ( rSize.Width() && rSize.Height() && ( nBits == 1 || nBits == 4 || nBits == 8 || nBits == 24 ) ) + if ( rSize.Width() && rSize.Height() ) { const ULONG nImageSize = AlignedWidth4Bytes( nBits * rSize.Width() ) * rSize.Height(); const USHORT nColors = ( nBits <= 8 ) ? ( 1 << nBits ) : 0; |