add PngImageFilter that uses libpng for PNG loading

Desktop / LibreOffice - Toma┼ż Vajngerl [collabora.co.uk] - 9 February 2019 10:57 EST

This adds loading of PNG images that uses libpng instead of our own solution. It always loaded the image as either RGB or RGBA image and if the source PNG is using something else, libpng converts to either RGB or RGBA.

In addition this adds tests for loading of various PNG files to make sure the resulting bitmaps are using pixel data as expected. (especially needed to check the RGBA bitmaps)

Change-Id: I194321caf76c2ec2365bb6075c79c5e84983658a Reviewed-on: https://gerrit.libreoffice.org/67571

34a6e8443312 add PngImageFilter that uses libpng for PNG loading
include/vcl/filter/PngImageReader.hxx | 39 +++++
vcl/CppunitTest_vcl_png_test.mk | 52 ++++++
vcl/Library_vcl.mk | 2 +
vcl/Module_vcl.mk | 1 +
vcl/qa/cppunit/png/PngFilterTest.cxx | 155 ++++++++++++++++
vcl/qa/cppunit/png/data/alpha-rect-8bit-RGBA.png | Bin 0 -> 158 bytes
vcl/qa/cppunit/png/data/color-rect-4bit-pal.png | Bin 0 -> 104 bytes
vcl/qa/cppunit/png/data/color-rect-8bit-RGB.png | Bin 0 -> 90 bytes
vcl/qa/cppunit/png/data/rect-1bit-pal.png | Bin 0 -> 89 bytes
vcl/source/filter/png/PngImageReader.cxx | 214 +++++++++++++++++++++++
10 files changed, 463 insertions(+)

Upstream: cgit.freedesktop.org


  • Share