implemented filtering for 8-bit pictures.