filter_scanline Function

Defined in pyglet.extlibs.png

filter_scanline(type, line, fo, prev=None)

Apply a scanline filter to a scanline. type specifies the filter type (0 to 4); line specifies the current (unfiltered) scanline as a sequence of bytes; prev specifies the previous (unfiltered) scanline as a sequence of bytes. fo specifies the filter offset; normally this is size of a pixel in bytes (the number of bytes per sample times the number of channels), but when this is < 1 (for bit depths < 8) then the filter offset is 1.

Previous topic

color_triple Function

Next topic

from_array Function