[plt-scheme] slideshow/textpic bitmaps

From: Eli Barzilay (eli at barzilay.org)
Date: Sun Mar 14 13:05:03 EST 2004

On Mar 14, Matthew Flatt wrote:
> At Sun, 14 Mar 2004 06:44:29 -0500, Daniel Silva wrote:
> > why does an image look pixelated when blown up for a larger screen
> > even when the final size is less than or equal to the image's
> > original dimension?
> 
> Perhaps the scaling process could be better.
> 
> Which platform are you using? If scaling looks bad mainly under X,
> it could be improved easily, since we implement scaling ourselves.
> Currently, scaling just copies or deletes rows/columns, and probably
> it looks worse than for other platforms. Under Mac OS, I'm fairly
> certain that scaling averages pixels. Under Windows, I'm not sure,
> and perhaps it depends on the display driver.

Scaling (mainly upsampling, but also downsampling) is a big deal with
pictures, which is why there is probably no single good solution.  For
example, ImageMagick has 15 different algorithms to choose for this...
In general, the right solution depends on what you want to do with the
image, the time you can spend doing it, and the type of image (picture
vs diagram vs text-like).  For something like presentations, I think
that this is important enough to justify more control to the user.
Ideally, some hook that can allow you to do your own size change from
the original image to whatever is needed, and you could hook in and do
it with something like ImageMagick.  (Of course this means doing it
before the image is read in...)

Without this, the best solution you have is to use a proper tool to
upscale the image to some huge size, and then when the image is scaled
down in the naive way, the results don't suffer too much.

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                  http://www.barzilay.org/                 Maze is Life!


Posted on the users mailing list.