diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2019-02-09 10:04:03 +0100 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2019-02-09 11:57:55 +0100 |
commit | bec35535b4cb784800a79cd315b4f761d0a6758e (patch) | |
tree | 43585a0550393612aa6d420e17d7445c951635ee /vcl/source/image | |
parent | 34a6e8443312c5f9aa0a1bb055fac50d722a90ff (diff) |
Use PngImageReader for loading the icons from the icon-themes
Change-Id: Id48c7707fd6c0ef72a41b102048be5749d5c4858
Reviewed-on: https://gerrit.libreoffice.org/67578
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl/source/image')
-rw-r--r-- | vcl/source/image/ImplImageTree.cxx | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/vcl/source/image/ImplImageTree.cxx b/vcl/source/image/ImplImageTree.cxx index c24d3e4221eb..9b9cfab2fc16 100644 --- a/vcl/source/image/ImplImageTree.cxx +++ b/vcl/source/image/ImplImageTree.cxx @@ -44,13 +44,13 @@ #include <vcl/bitmapex.hxx> #include <vcl/dibtools.hxx> -#include <vcl/pngread.hxx> #include <vcl/settings.hxx> #include <vcl/svapp.hxx> #include <vcl/BitmapTools.hxx> #include <vcl/IconThemeScanner.hxx> -#include <vcl/pngwrite.hxx> +#include <vcl/filter/PngImageReader.hxx> #include <vcl/outdev.hxx> +#include <vcl/pngwrite.hxx> #include <BitmapLightenFilter.hxx> @@ -158,9 +158,8 @@ void loadImageFromStream(std::shared_ptr<SvStream> const & xStream, OUString con if (rPath.endsWith(".png")) { - vcl::PNGReader aPNGReader(*xStream); - aPNGReader.SetIgnoreGammaChunk(true); - rParameters.mrBitmap = aPNGReader.Read(); + vcl::PngImageReader aPNGReader(*xStream); + aPNGReader.read(rParameters.mrBitmap); } else if (rPath.endsWith(".svg")) { @@ -362,9 +361,8 @@ bool loadDiskCachedVersion(OUString const & sVariant, ImageRequestParameters& rP if (!urlExists(sUrl)) return false; SvFileStream aFileStream(sUrl, StreamMode::READ); - vcl::PNGReader aPNGReader(aFileStream); - aPNGReader.SetIgnoreGammaChunk(true); - rParameters.mrBitmap = aPNGReader.Read(); + vcl::PngImageReader aPNGReader(aFileStream); + aPNGReader.read(rParameters.mrBitmap); return true; } |