diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-12 14:07:24 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-14 07:28:01 +0100 |
commit | 83330a608d0e0be9735d00ae5d60ba262bd235c3 (patch) | |
tree | 9c373721e600e3582eca6a3ac0f7a001ccc81f69 | |
parent | 2096aac8b958db66b3ddce16b06dca87edc8ba0a (diff) |
use Color, not BitmapColor in RawBitmap
because we don't want palette images
Change-Id: If087e51503714bf8474ae320381f80196092ceb0
Reviewed-on: https://gerrit.libreoffice.org/49662
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | filter/source/graphicfilter/itga/itga.cxx | 2 | ||||
-rw-r--r-- | include/vcl/BitmapTools.hxx | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/filter/source/graphicfilter/itga/itga.cxx b/filter/source/graphicfilter/itga/itga.cxx index 3a37f27b10bb..e980e3c20925 100644 --- a/filter/source/graphicfilter/itga/itga.cxx +++ b/filter/source/graphicfilter/itga/itga.cxx @@ -660,7 +660,7 @@ bool TGAReader::ImplReadBody() m_rTGA.ReadUChar( nBlue ).ReadUChar( nGreen ).ReadUChar( nRed ); if ( !m_rTGA.good()) return false; - mpBitmap->SetPixel( nY, nX, BitmapColor( nRed, nGreen, nBlue ) ); + mpBitmap->SetPixel( nY, nX, Color( nRed, nGreen, nBlue ) ); } break; diff --git a/include/vcl/BitmapTools.hxx b/include/vcl/BitmapTools.hxx index 3f9629a51905..d5c3056e8738 100644 --- a/include/vcl/BitmapTools.hxx +++ b/include/vcl/BitmapTools.hxx @@ -32,13 +32,15 @@ public: maSize(rSize) { } - void SetPixel(long nY, long nX, BitmapColor nColor) + void SetPixel(long nY, long nX, Color nColor) { long p = (nY * maSize.getWidth() + nX) * 3; mpData[ p++ ] = nColor.GetRed(); mpData[ p++ ] = nColor.GetGreen(); mpData[ p ] = nColor.GetBlue(); } + // so we don't accidentally leave any code in that uses palette color indexes + void SetPixel(long nY, long nX, BitmapColor nColor) = delete; long Height() { return maSize.Height(); } long Width() { return maSize.Width(); } }; |