[racket-dev] Scribble bug?

From: Antonio Menezes Leitao (antonio.menezes.leitao at ist.utl.pt)
Date: Thu Jul 31 13:58:16 EDT 2014

Hi,

Scribble doesn't correctly render scaled bitmaps when the scale produces
ratios in the width or height of the pict.

The following scribble program:

#lang scribble/base
@(require pict)
@(bitmap "foo.jpg")

generates an html file that includes:

<img style="vertical-align: 0px; margin: -3px -3px -3px -3px;"
src="pict.png" alt="image" width="1587" height="977"/>

However, the following scribble program that scales the image:

#lang scribble/base
@(require pict)
@(scale-to-fit  (bitmap "foo.jpg") 1024 1024)

generates an html that includes:

<img style="vertical-align: 0px; margin: -3px -3px -3px -3px;"
src="pict.png" alt="image" width="1030" height="1003790/1581"/>

Note the fraction, which Chrome does not parse correctly. The result is as
an incredibly stretched image.

Best,
António.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/dev/archive/attachments/20140731/e67ec706/attachment.html>

Posted on the dev mailing list.