469,293 Members | 1,319 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,293 developers. It's quick & easy.

Saving PyOpenGl figures as ps

Hi,

I installed pyopengl (opengl for python) on my linux box and
everything works fine. But now I want to save the generated images as,
e.g., ps or eps. How can I do that and how can I adjust the resolution
(if necessary)? This is probably simple but for some reason I can not
find out how to do that.

I appreciate every hint!

Thanks, Frank

Feb 11 '07 #1
2 1517
On Feb 12, 3:11 am, "Frank" <super...@gmail.comwrote:
Hi,

I installed pyopengl (opengl for python) on my linux box and
everything works fine. But now I want to save the generated images as,
e.g., ps or eps. How can I do that and how can I adjust the resolution
(if necessary)? This is probably simple but for some reason I can not
find out how to do that.

I appreciate every hint!
Well, that's not that simple. Search the web, there are several
tutorials about PostScipt output.

Feb 12 '07 #2
Frank wrote:
Hi,

I installed pyopengl (opengl for python) on my linux box and
everything works fine. But now I want to save the generated images as,
e.g., ps or eps. How can I do that and how can I adjust the resolution
(if necessary)? This is probably simple but for some reason I can not
find out how to do that.

I appreciate every hint!

Thanks, Frank
Hi Frank,

Take a look at the demos in OpenGL, particularly:

OpenGL-ctypes/OpenGL/Demo/GLUT/tom/conesave.py

which is a little GLUT application that renders into a GLUT windows and
then allows you to save it. That's raster operation though (i.e.
produces a PNG or JPG). Raster operations can only save a portion of
the screen as rendered, so if you want a higher resolution image you
need to make a larger window. If you want to get more advanced you can
try using an off-screen buffer (pbuffer or MESA) for the rendering,
which may (depending on implementation) allow for higher resolutions.

If you want a true vector graphic (PS, EPS) you'll need to use something
like GL2PS.

http://www.geuz.org/gl2ps/

HTH,
Mike

--
________________________________________________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://www.vrplumber.com
http://blog.vrplumber.com

Feb 12 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Jimmy Johns | last post: by
2 posts views Thread by Erik Max Francis | last post: by
5 posts views Thread by Sébastien Ramage | last post: by
1 post views Thread by joroy | last post: by
reply views Thread by sweetmelon | last post: by
reply views Thread by shirish | last post: by
2 posts views Thread by seb.haase | last post: by
reply views Thread by Colin J. Williams | last post: by
1 post views Thread by Clay Hobbs | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.