[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gamegrid.el and some games

From: alkibiades
Subject: Re: gamegrid.el and some games
Date: Tue, 17 Sep 2002 01:13:11 +0200
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i686-pc-linux-gnu)

Richard Stallman <address@hidden> writes:

>     > * Use a PBM form of the same image.  How hard is that?  Does it have
>     > drawbacks?
>     You mean, if a package provides only XPM we should calculate a PBM/XBM
>     image from that XPM via manipulation of the data strings?
> I was thinking that the programmer would supply the image in PBM
> format.  This could be in addition to XPM, or instead of XPM.  How
> hard is that?

That's easy. 

However, my misunderstanding caused me to read a bit about the PBM
format. I discovered that my Emacs supports PPM and PGM, too. The
three related image formats PBM (black & white), PGM (grayscale) and
PPM (colour) are supposed to be intermediate formats for image

Well, it should be straightforward to convert XPM to PPM. I already
started to write a small library.

I don't know anything about Emacs' internals. Does an Emacs that
supports images always support colours, too? Does an Emacs that
supports PBM alway support PPM, too?

If this is so and if I am not missing something this would mean, that
every Emacs able to display images could display XPMs via some Lisp.

>     It is a pity that Emacs does not provide any means to create and
>     change an image in the image cache directly. This could make this task
>     (and some others) much easier.
> I guess so.  It would be nice if all image formats (or at least more
> of them) supported getting the image from Lisp data rather than from
> a file.  Does someone want to work on that?

Perhaps you like the approach that I chose in my unfinished code

For example:

(let ((pic (make-pixmap 16 16 'colour '(0 0 0))))
  (experimental!-draw-line pic 15 0 0 15 '(255 0 0))
  (experimental!-draw-line pic 0 0 15 15 '(0 0 255))
  (insert-image (experimental!-pixmap-to-image pic :ascent 'center)))

    -- Oliver

Attachment: the-gimp.el
Description: application/emacs-lisp

Oliver Scholz               30 Fructidor an 210 de la Révolution
Taunusstr. 25               Liberté, Egalité, Fraternité!
60329 Frankfurt a. M.       http://www.jungdemokratenhessen.de
Tel. (069) 97 40 99 42      http://www.jdjl.org

reply via email to

[Prev in Thread] Current Thread [Next in Thread]