In PHP GD, what does the PNG_ALL_FILTERS
do and how is that related to "adaptive filtering" of png images?
Background
In php, the imagepng
function from the GD library has a parameter for filters. The documentation on the filter type constants allowed only "reveals" that these constants represent:
A special PNG filter, used by the imagepng() function
Very helpful indeed.
This answer on SO tells more, but lacks information on the constant PNG_ALL_FILTERS
. To me, it seems that the other filters are mutually exclusive, so what does "all" do?
In my search, I found that for png filtering, a good strategy (under certain circumstances) would be to pick the most optimal filter for each scan line separately, called "adaptive filtering".
Considering the above, I would guess that "adaptive filtering" is accomplished with the PNG_ALL_FILTERS
option. Am I guessing right? If not, what does PNG_ALL_FILTERS
do? And can I get GD to do adaptive filtering from php?
Thanks a lot!