[From nobody Tue Jan 17 23:15:29 2012
Path: nntp.brown.edu!oshean-news.uri.edu!128.230.129.112.MISMATCH!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!feed.news.tiscali.de!newsfeed.vmunix.org!newsfeed.hanau.net!news-fra1.dfn.de!news.tele.dk!not-for-mail
Date: Wed, 22 Sep 2004 09:21:59 +0200
From: =?iso-8859-1?q?Jens_Axel_S=F8gaard?= &lt;usenet@soegaard.net&gt;
User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803)
X-Accept-Language: en-us, en
Newsgroups: comp.lang.scheme
Subject: Re: Displaying bitmaps
References: &lt;8p54d.17459$k95.10255@fe1.columbus.rr.com&gt;
In-Reply-To: &lt;8p54d.17459$k95.10255@fe1.columbus.rr.com&gt;
Lines: 41
Message-ID: &lt;41512815$0$197$edfadb0f@dread11.news.tele.dk&gt;
Organization: TDC Totalloesninger
NNTP-Posting-Host: 80.62.83.99
X-Trace: 1095837717 dread11.news.tele.dk 197 80.62.83.99:54847
X-Complaints-To: abuse@post.tele.dk
Xref: nntp.brown.edu comp.lang.scheme:56076
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

Dennis Dunn wrote:

&gt; I'm using PLT Scheme to do some image processing.  I would like to=20
&gt; display an image file but the viewport graphics module doesn't seem to=20
&gt; have an easy way to do this.
&gt;=20
&gt; I see that there is a method to draw an image in a viewport but the=20
&gt; viewport must be the proper size first.  I need to know the resolution=20
&gt; of the image file before I can create a viewport big enough to draw into.

If you just want to see the image, then you can use the repl as in
&lt;http://schemecookbook.org/Cookbook/GUIRecipeImagesInTheInteractionWindow&gt;.
Otherwise make a bitmap (search for bitmap% in the HelpDesk) and then
call the methods get-height and get-depth to find the size.

&gt; The MrEd module has a bitmap% class that would seem to do what I need,=20
&gt; that is I can load an image file into the bitmap% object without knowing=
=20
&gt;  the resolution of the image.  However, I haven't been able to figure=20
&gt; out how to display the bitmap% object.

&gt; I could load the image file into the bitmap% object and do all of my=20
&gt; processing on the bitmap device context if only I could display the=20
&gt; bitmap%.  Or I could do all of my processing on a viewport (or pixmap)=20
&gt; if I could easily load the file into the viewport.

The function update-view is an example of how to do this:
     &lt;http://schemecookbook.org/view/Cookbook/GUIRecipeAnimation&gt;.
First one gets a drawing context from the canvas, and then
the method draw-bitmap of the drawing context is called with the
bitmap as one of it's arguments.

--=20
Jens Axel S=F8gaard

]