[plt-scheme] slideshow/textpic bitmaps

From: Daniel Silva (dansilva at lynx.dac.neu.edu)
Date: Sun Mar 14 06:44:29 EST 2004

On Thu, 2004-03-11 at 23:24, Matthew Flatt wrote:
> At Thu, 11 Mar 2004 23:24:22 -0500, Daniel Silva wrote:
> > When loading PNG images with (bitmap "filename.png") to use in a
> > slideshow, my PNGs usually come out looking really poor, even if I scale
> > them down.
> 
> What do you mean by "scale them down"?

Applying something like (scale (bitmap "filename.png") 0.6).

> My first guess is that your screen isn't 1024x768, and so the slides
> (including bitmap content) is scaled to fit your screen.

Yep.  The images look fine on a laptop at 1024x768, which is what
matters for presentations in a conference room, but not if you also want
to make the slideshow available for download.

> A reliable way to counter this scaling is to wrap the bitmap pict with
> `size-in-pixels'. Of course, for different display sizes, the bitmap
> will be a different size relative to the rest of the slide.
> 
> But are you already using `size-in-pixels'?

Oh, I wasn't using size-in-pixels.  When I do, the images don't look
pixelated, but as you said, their relative sizes change, making the
slideshow inconsistent across different machines.

Robby's suggestion of passing "-s 1024 768" in the command line works
too.

The current mechanism is fine and I still prefer it to latex or
powerpoint/oo-impress, but I'm curious: 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?  That is, in the following
code:

(scale (bitmap "filename.png") 0.10)

is the image first blown up to 156.25% its original size (to fit a
1600x1200 screen), creating a new pixelated larger image that is then
scaled down by 10%?  Or is the image first scaled down by 10%, creating
a new smaller image that is then blown up by 156.25%?

If I had a 500x500 image and scaled it down to 60% its size (300x300),
the final size on a 1600x1200 screen would be 468.75x468.75, which would
look much better as a scaled-down version of a 500x500 image than as a
blown-up version of a 300x300 image.  Maybe a pict struct could hold the
original image buffer and a scaling factor that's applied on display
instead of a scaled buffer?

Daniel



Posted on the users mailing list.