leonbloy / pngj

PNGJ : pure Java library for high performance PNG encoding
http://hjg.com.ar/pngj/
273 stars 52 forks source link

Different filter types per scanline #36

Closed sebkur closed 9 years ago

sebkur commented 9 years ago

According to http://www.libpng.org/pub/png/spec/1.2/PNG-DataRep.html#DR.Filtering it is generally possible to use a different filter type for each individual scanline. Are there plans for supporting this? At the moment the documentation for PngWriter.setFilterType() states that this has to be called just after construction, I guess one could implement it in a way such that it can be altered in between calls to PngWriter.writeRow(). Or maybe this is already working?

sebkur commented 9 years ago

Oh, sorry, I just found that FilterType has a lot of options for using multiple filters during encoding