From 027b3a2081dc4e363897e00ab04db6ce6da831fb Mon Sep 17 00:00:00 2001 From: Oliver Bolte Date: Mon, 10 Jul 2006 13:19:54 +0000 Subject: INTEGRATION: CWS bitcount01 (1.4.70); FILE MERGED 2006/04/13 23:34:21 thb 1.4.70.2: RESYNC: (1.4-1.5); FILE MERGED 2006/04/11 09:42:08 thb 1.4.70.1: #i63959# Discretizing bitcount for tiff, ras and pict export --- goodies/source/filter.vcl/etiff/etiff.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/goodies/source/filter.vcl/etiff/etiff.cxx b/goodies/source/filter.vcl/etiff/etiff.cxx index 44273bf780c7..fa87da6b3314 100644 --- a/goodies/source/filter.vcl/etiff/etiff.cxx +++ b/goodies/source/filter.vcl/etiff/etiff.cxx @@ -4,9 +4,9 @@ * * $RCSfile: etiff.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: hr $ $Date: 2006-06-19 21:43:59 $ + * last change: $Author: obo $ $Date: 2006-07-10 14:19:54 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -204,6 +204,11 @@ BOOL TIFFWriter::WriteTIFF( const Graphic& rGraphic, SvStream& rTIFF, if ( mpAcc ) { mnBitsPerPixel = aBmp.GetBitCount(); + + // export code below only handles four discrete cases + mnBitsPerPixel = + mnBitsPerPixel <= 1 ? 1 : mnBitsPerPixel <= 4 ? 4 : mnBitsPerPixel <= 8 ? 8 : 24; + if ( ImplWriteHeader( ( aAnimation.Count() > 0 ) ) ) { Size aDestMapSize( 300, 300 ); -- cgit