468,288 Members | 1,985 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

Jpg

I am building a GUI interface at the moment, and would like to have
support for displaying a jpg file, and a FITS file if possible. Is
there any way to do this? My interface has been written in Tkinter at
the moment, especially because of it's great portability, I wouldn't
have to install the other interface software on every computer that I
use (At the moment it is 3, and will signifigantly increase). I'd
prefer to only use built-in functions, but if it can't be done, I'm
willing to look for something else. Is there any way I can do this?
Thanks!

Oct 26 '05 #1
2 1434
Tuvas (tu*****@gmail.com) wrote:
: I am building a GUI interface at the moment, and would like to have
: support for displaying a jpg file, and a FITS file if possible. Is
: there any way to do this? My interface has been written in Tkinter at
: the moment, especially because of it's great portability, I wouldn't
: have to install the other interface software on every computer that I
: use (At the moment it is 3, and will signifigantly increase). I'd
: prefer to only use built-in functions, but if it can't be done, I'm
: willing to look for something else. Is there any way I can do this?
: Thanks!

Plenty of ways to do it, although I'm not familiar with TKInter so I'll
leave that part to someone else.

You might find pCFITSIO usefull reading the FITS files though.
http://panoramix.stsci.edu/~npirzkal/python/pcfitsio/
You would then use some python code or the PIL module to convert the FITS
data in a suitable format for TKInter.
---

cds
Oct 26 '05 #2
Tuvas wrote:
I am building a GUI interface at the moment, and would like to have
support for displaying a jpg file, and a FITS file if possible. Is
there any way to do this? My interface has been written in Tkinter at
the moment, especially because of it's great portability, I wouldn't
have to install the other interface software on every computer that I
use (At the moment it is 3, and will signifigantly increase). I'd
prefer to only use built-in functions, but if it can't be done, I'm
willing to look for something else. Is there any way I can do this?
Thanks!


For FITS file reading, an alternative to pCFITSIO is PyFITS (http://www.stsci.edu/resources/softw...rdware/pyfits).
I guess both need numarray...

gifImage = Tkinter.PhotoImage(file="file.gif")
ima = yourCanvas.create_image(xpos,ypos,image=gifImage)

is the quickest way to display gifs. My version of Tkinter (1.177)
does not directly support jpg, but with PIL that should be possible.

Ugly but quick solution (for Linux): produce gifs from FITS/jpg
files with os.system("convert") and feed them to Tkinter.
Oct 28 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by William C. White | last post: by
2 posts views Thread by Albert Ahtenberg | last post: by
3 posts views Thread by James | last post: by
reply views Thread by Ollivier Robert | last post: by
1 post views Thread by Richard Galli | last post: by
4 posts views Thread by Albert Ahtenberg | last post: by
1 post views Thread by inderjit S Gabrie | last post: by
2 posts views Thread by Jack | last post: by
3 posts views Thread by Sandwick | last post: by
2 posts views Thread by MrBee | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.