pygsear-users
[Top][All Lists]
Advanced

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

Re: [pygsear] save a picture


From: Lee Harr
Subject: Re: [pygsear] save a picture
Date: Tue, 08 Apr 2003 03:34:53 +0000

lee
Fine job. I like that you put a help file in the front of the interactive python under examples.

Yea, I was just playing around and realized I could do that.
I thought it was kinda neat.


I'm trying to define width. I looked in /pygsear-0.40/pygsear/Drawable.py and found a setWidth and on the class init I see a width = 20??

hmm... I see a default width=20 for the Drawable.Rectangle class,
but nothing to do with the Turtle

I'd like to call a method width() which would give me control over the pixels.


Well... you can do:

pete.width = 5

or whatever width you want.  I did not make width a function,
because I figure it would be nice to just have it as a property.

ie. It is possible in newer python versions that when you do
pete.width = 5 it actually does something like pete.setWidth(5)
and maybe setWidth() makes sure the width is not negative or
a thousand or something.

Anyhow, that is why it is setWidth(), and not width().


I'd like to save a picture. I see there is a pete.save. But, the help is too vague. Can I specify
the file extension? Like pgn gif or jpeg?
TIA
re-v


At this point, Pygame can only save as a .bmp or a .tga file.

With the "extended" SDL_image library it can load .png files,
so I don't see why it can't save them in that format, but I
do not think it does yet.

Good question for the pygame list.

Once the file is saved as "picture.bmp" or "picture.tga" it is
pretty easy to open it up in gimp and re-save it as a .gif .png
or .jpeg

That's probably why no one has done the work to make it save
directly yet  ;o)


_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail





reply via email to

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