Smart filter to remove Floyd-Steinberg dithering from paletted images