diff options
author | Noel <noel.grandin@collabora.co.uk> | 2021-03-29 14:23:16 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-03-31 09:22:27 +0200 |
commit | a6c6f35ccc78e74cfa76397d649c1b6fc4baad29 (patch) | |
tree | 61c47ee4099b8db2996e2c00ba99dbe5f79ab68d /vcl/source/gdi | |
parent | 5c90f3d28de6262bb730bad106d4652e458054df (diff) |
drop 4bpp image formats
on a path to simplifying our internal bitmap stuff, aiming to
support a smaller set of image formats, but support them
in an accelerated fashion.
Change-Id: I5f8bf3cd49abf16ce460771492cdd5f358cb34df
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113313
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/gdi')
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 5 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl2.cxx | 5 |
2 files changed, 2 insertions, 8 deletions
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 365204314733..2142aeac8808 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -9126,12 +9126,9 @@ const BitmapEmit& PDFWriterImpl::createBitmapEmit( const BitmapEx& i_rBitmap, co BitmapEx aBitmap( i_rBitmap ); if( m_aContext.ColorMode == PDFWriter::DrawGreyscale ) { - BmpConversion eConv = BmpConversion::N8BitGreys; int nDepth = aBitmap.GetBitmap().GetBitCount(); - if( nDepth <= 4 ) - eConv = BmpConversion::N4BitGreys; if( nDepth > 1 ) - aBitmap.Convert( eConv ); + aBitmap.Convert( BmpConversion::N8BitGreys ); } BitmapID aID; aID.m_aPixelSize = aBitmap.GetSizePixel(); diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx index 862717adfd4e..1aacbce99934 100644 --- a/vcl/source/gdi/pdfwriter_impl2.cxx +++ b/vcl/source/gdi/pdfwriter_impl2.cxx @@ -163,12 +163,9 @@ void PDFWriterImpl::implWriteBitmapEx( const Point& i_rPoint, const Size& i_rSiz if( m_aContext.ColorMode == PDFWriter::DrawGreyscale ) { - BmpConversion eConv = BmpConversion::N8BitGreys; int nDepth = aBitmapEx.GetBitmap().GetBitCount(); - if( nDepth <= 4 ) - eConv = BmpConversion::N4BitGreys; if( nDepth > 1 ) - aBitmapEx.Convert( eConv ); + aBitmapEx.Convert( BmpConversion::N8BitGreys ); } bool bUseJPGCompression = !i_rContext.m_bOnlyLosslessCompression; if ( bIsPng || ( aSizePixel.Width() < 32 ) || ( aSizePixel.Height() < 32 ) ) |