From 661ed1d28ef03bc61739e4998b8d60005f1f2ee3 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sat, 13 Jan 2018 13:21:23 -0500 Subject: [PATCH] Minor fixes to Pl_PNGFilter --- libqpdf/Pl_PNGFilter.cc | 4 ++-- libqpdf/qpdf/Pl_PNGFilter.hh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libqpdf/Pl_PNGFilter.cc b/libqpdf/Pl_PNGFilter.cc index 35ab03f..730d6d9 100644 --- a/libqpdf/Pl_PNGFilter.cc +++ b/libqpdf/Pl_PNGFilter.cc @@ -16,10 +16,10 @@ Pl_PNGFilter::Pl_PNGFilter(char const* identifier, Pipeline* next, buf2(0), pos(0) { - if ((samples_per_pixel < 1) || (samples_per_pixel > 4)) + if (samples_per_pixel < 1) { throw std::runtime_error( - "PNGFilter created with invalid samples_per_pixel not from 1 to 4"); + "PNGFilter created with invalid samples_per_pixel"); } if (! ((bits_per_sample == 1) || (bits_per_sample == 2) || diff --git a/libqpdf/qpdf/Pl_PNGFilter.hh b/libqpdf/qpdf/Pl_PNGFilter.hh index b5fcf53..f167c67 100644 --- a/libqpdf/qpdf/Pl_PNGFilter.hh +++ b/libqpdf/qpdf/Pl_PNGFilter.hh @@ -12,7 +12,7 @@ class Pl_PNGFilter: public Pipeline { public: - // Encoding is not presently supported + // Encoding is only partially supported enum action_e { a_encode, a_decode }; QPDF_DLL -- libgit2 0.21.4