diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2003-05-22 09:24:34 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2003-05-22 09:24:34 +0000 |
commit | 719701622d7148b1a3d85554d69090a0cbf95830 (patch) | |
tree | aa07b340dc2fbee8dc5b71c76bbbb8e8e2d0441f /goodies | |
parent | df8e8ed388a72b3896a0774b3a0ad676c812356b (diff) |
INTEGRATION: CWS draw11 (1.5.12); FILE MERGED
2003/05/13 16:00:07 sj 1.5.12.1: #i12264# 2-bit bitmaps are not supported, we will use 4bit instead
Diffstat (limited to 'goodies')
-rw-r--r-- | goodies/source/filter.vcl/ipict/ipict.cxx | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/goodies/source/filter.vcl/ipict/ipict.cxx b/goodies/source/filter.vcl/ipict/ipict.cxx index 0cd0b5dc5389..f6d59b5f43b3 100644 --- a/goodies/source/filter.vcl/ipict/ipict.cxx +++ b/goodies/source/filter.vcl/ipict/ipict.cxx @@ -2,9 +2,9 @@ * * $RCSfile: ipict.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: hr $ $Date: 2003-03-25 18:28:18 $ + * last change: $Author: vg $ $Date: 2003-05-22 10:24:34 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -691,7 +691,13 @@ ULONG PictReader::ReadPixMapEtc( Bitmap &rBitmap, BOOL bBaseAddr, BOOL bColorTab pPict->SeekRel( 8 ); nDataSize += 46; - aBitmap = Bitmap( Size( nWidth, nHeight ), ( nPixelSize > 8 ) ? 24 : nPixelSize ); + + sal_uInt16 nDstBitCount = nPixelSize; + if ( nDstBitCount > 8 ) + nDstBitCount = 24; + else if ( nDstBitCount == 2 ) + nDstBitCount = 4; + aBitmap = Bitmap( Size( nWidth, nHeight ), nDstBitCount ); if ( ( pAcc = aBitmap.AcquireWriteAccess() ) == NULL ) BITMAPERROR; |