[plt-scheme] Re: Save image file from canvas
Thank you for the suggestions.
I will try those and see if they work.
--- plt-scheme-request at list.cs.brown.edu wrote:
> Send plt-scheme mailing list submissions to
> plt-scheme at list.cs.brown.edu
>
> To subscribe or unsubscribe via the World Wide Web,
> visit
>
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> or, via email, send a message with subject or body
> 'help' to
> plt-scheme-request at list.cs.brown.edu
>
> You can reach the person managing the list at
> plt-scheme-owner at list.cs.brown.edu
>
> When replying, please edit your Subject line so it
> is more specific
> than "Re: Contents of plt-scheme digest..."
>
>
> [Please handle PLT Scheme list administrative tasks
> through the Web:
>
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme]
>
>
> Today's Topics:
>
> 1. geiser, a new scheme/emacs interaction mode
> (Jose A. Ortega Ruiz)
> 2. Re: Save image file from canvas (Stephen De
> Gabrielle)
> 3. Re: Save image file from canvas (Stephen De
> Gabrielle)
> 4. Re: scrollable pane (Carl Eastlund)
>
>
>
----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 14 May 2009 02:34:27 +0200
> From: "Jose A. Ortega Ruiz" <jao at gnu.org>
> Subject: [plt-scheme] geiser, a new scheme/emacs
> interaction mode
> To: plt-scheme at list.cs.brown.edu
> Message-ID: <87ws8kcyjw.fsf at mithrandir.homeunix.net>
> Content-Type: text/plain; charset=us-ascii
>
>
> Hi,
>
> I've been working on a new Scheme-Emacs interaction
> mode (which i'm
> calling Geiser) for a while now, and it's got to the
> point, i think, of
> being usable. PLT is one of its two supported
> backends, and it provides
> things like namespace-aware and incremental
> evaluation (without
> restarting the REPL), completion or
> jump-to-definition. The README file:
>
>
<http://git.hacks-galore.org/gitweb/jao?p=geiser.git;a=blob_plain;f=README;hb=HEAD>
>
> gives more details, including installation
> instructions. You can get
> the code using git:
>
> git clone http://git.hacks-galore.org/jao/geiser.git
>
> I've also posted a mostly content-free blog entry at
> <http://programming-musings.org>.
>
> Geiser is still work in progress, and there are many
> features i want to
> add (stealing, for instance, from Neil's quack or
> Eli's interactive.ss),
> but if any of you feels like giving it a try and
> providing criticism
> and/or feature requests, i'll be more than happy to
> take them into
> account.
>
> I'd like to thank the PLT team and other
> participants in this list for
> answering my questions and for providing
> extraordinarily quick fixes for
> the few issues with mzscheme itself i've found. I'm
> enjoying my return
> to PLT hacking quite a bit!
>
> Cheers,
> jao
>
>
>
> ------------------------------
>
> Message: 2
> Date: Thu, 14 May 2009 12:47:16 +0100
> From: Stephen De Gabrielle
> <stephen.degabrielle at acm.org>
> Subject: Re: [plt-scheme] Save image file from
> canvas
> To: Scott Brown <sukottoburaun at yahoo.co.jp>
> Cc: plt-scheme at list.cs.brown.edu
> Message-ID:
>
>
<595b9ab20905140447s2045e2bfy3d6b998469976e92 at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> I can't work it out either, but oyu may be able to
> use the following
> techique to draw straight to a bitmap-dc which you
> can save.
>
> - I can't remember where I found this;
> #lang scheme/gui
> (let
> ((bitmap (make-object bitmap% 255 255))
> (dc (make-object bitmap-dc%))
> (red-amount 150)
> (image-file "test.jpg"))
>
> (send dc set-bitmap bitmap)
>
> ;; do some drawing
> (do ((x 0 (+ x 1)))
> ((>= x 255))
> (do ((y 0 (+ y 1)))
> ((>= y 255))
> (send dc set-pixel x y
> (make-object color% x y 50)
> ))
> )
> ;;
> (when (file-exists? image-file)
> (delete-file image-file))
> ;; this bit saves the canvas
> (send bitmap save-file image-file 'jpeg 100)
>
> (display image-file)
> (display (current-directory))
> )
>
>
> 2009/5/14 Scott Brown <sukottoburaun at yahoo.co.jp>
>
> > I have created a turtle module which draws
> pictures using
> > a canvas% object and the draw-line method of dc
> from the
> > PLT Graphics Toolkit.
> > Is there some way to save pictures drawn to
> canvas% as
> > image files?
> >
> >
> > --------------------------------------
> > Power up the Internet with Yahoo! Toolbar.
> > http://pr.mail.yahoo.co.jp/toolbar/
> > _________________________________________________
> > For list-related administrative tasks:
> >
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> >
>
>
>
> --
>
> --
> Stephen De Gabrielle
> stephen.degabrielle at acm.org
> Telephone +44 (0)20 85670911
> Mobile +44 (0)79 85189045
> http://www.degabrielle.name/stephen
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
>
http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20090514/35606390/attachment-0001.html
>
> ------------------------------
>
> Message: 3
> Date: Thu, 14 May 2009 12:52:47 +0100
> From: Stephen De Gabrielle
> <stephen.degabrielle at acm.org>
> Subject: Re: [plt-scheme] Save image file from
> canvas
> To: Scott Brown <sukottoburaun at yahoo.co.jp>
> Cc: plt-scheme at list.cs.brown.edu
> Message-ID:
>
>
<595b9ab20905140452i19a2ec83x87c1270611f16d30 at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> There is also a
>
post-script-dc%<file:///Applications/PLT%20Scheme%20Full%20v4.1.5.5/doc/gui/post-script-dc_.html>that
> might be good for inserting high quality versions of
> your turtle line
> art in other documents.
>
=== 以下のメッセージは省略されました ===
--------------------------------------
Power up the Internet with Yahoo! Toolbar.
http://pr.mail.yahoo.co.jp/toolbar/