From c08ab6a62e2627e62d68b5d93a8f8c2641966571 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Sat, 4 May 2019 19:26:16 +0000 Subject: add comments git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@3600 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- converter/other/pngx.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'converter/other/pngx.c') diff --git a/converter/other/pngx.c b/converter/other/pngx.c index 4bb09421..8295b979 100644 --- a/converter/other/pngx.c +++ b/converter/other/pngx.c @@ -416,6 +416,26 @@ void pngx_setFilter(struct pngx * const pngxP, int const filterSet) { + /* This sets the allowed filters in the compressor. The filters, and thus + the interpretation of 'filterSet', is specific to a filter method (aka + filter type), which you set with pngx_setIhdr. There is only one + filter method defined today, though (PNG_FILTER_TYPE_BASE). + + For filter method Base, 'filterSet' is the OR of the following masks, + each one allowing the compressor to use one filter. Not that the + compressor decides on a row-by-row basis what filter to use. + + PNG_FILTER_NONE + PNG_FILTER_SUB + PNG_FILTER_UP + PNG_FILTER_AVG + PNG_FILTER_PAETH + + There are also + + PNG_NO_FILTERS + PNG_ALL_FILTERS + */ png_set_filter(pngxP->png_ptr, 0, filterSet); } -- cgit 1.4.1