[Scummvm-devel] FreeSCI options and filters

lskovlun at image.dk lskovlun at image.dk
Fri Sep 4 23:08:06 CEST 2009

You wrote:
> Am 03.09.2009 um 14:38 schrieb yotam barnoy:
>> Couldn't we find a way to un-dither after all? We know the palette
>> that's desired for the image, and we know how it dithers, so all
>> that remains is scanning the bitmaps for the (up to) 16 patterns and
>> replacing them with the proper palette colors. If that's too
>> expensive, we can maybe add in hints per image.
> It's easy to construct examples where this would not work correctly,
> no matter how you do it. A simple example: Consider a triangular area
> (or any area with non-horizontal or non-vertical borders), framed with
> a black border, filled with a black-white checkboard pattern. At
> border, the dithering pattern and the enclosing frame mesh up, and in
> general it becomes difficult to impossible to properly separate the
> pattern from the frame. In this simple example, a human could
> potentially do it (and maybe one can even make a clever algorithm).
> But increasingly harder cases can be constructed.
> But maybe this is not an issue for SCI, maybe only very easy cases
> occur?

I'd be wary to implement such a thing, for the reason you state. At the
very least, we'd have to restrict un-dithering to border pixels which
closely resemble the surrounding pic pixels. It would not be an easy task
at all.


More information about the Scummvm-devel mailing list