Welcome to iraf.net Friday, April 26 2024 @ 05:34 PM GMT


 Forum Index > Help Desk > Applications New Topic Post Reply
 GIF output from IRAF graphing program
   
dougmink
 08/28/2009 08:54PM (Read 1556 times)  
++---
Junior

Status: offline


Registered: 12/09/2005
Posts: 17
I want to spit out a gif file to standard output from a graphics program like splot or one of my rvsao tasks to serve over the Web. Is there a way to do this using the g-gif graphcap entry in some way? Ideally, I would like to avoid creating an intermediate file, but I can create and delete one if I have to. I have been using plotutils to capture the Tektronix codes from stdout and translate them to GIF on the fly, but it seems our web security is keeping me from getting at the appropriate shared libraries or something like that. And doing it all within IRAF would be cleaner anyway.-Doug Mink

 
Profile Email Website
 Quote
fitz
 08/28/2009 08:54PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
The default for the sgi2gif translator is to write to STDOUT when the input is either from STDIN or there is only one file. So, if this is truly what you want then a slight tweak to the graphcap would look like:[code:1:8632e3ffd4]
g-gif|UNIX generic interface to multi-frame GIF file generator:\
:DD=ugif,tmp$sgk,!{ sgidispatch sgi2gif -w $(PX) -h $(PY) \
-bg 255 255 255 -fg 0 0 0 < $F ; \
rm $F.[1-8]; }&:MF#8:NF:tc=sgi_image_format:
[/code:1:8632e3ffd4]i.e. remove the -root flag and redirect the $F filename.Whether this does what you want is another matter: For web display you'll generally need to output some http header text like the mime-type for the client to make sense of it. Since you're presumably already using a script of some kind you might consider just writing to a fixed filename and have the script return the gif file (on stdout if you like). I've never actually tried this from within IRAF so you might check that the binary data on the stdout stream isn't messing up the parent CL session.Cheers,
-Mike

 
Profile Email
 Quote
   
Content generated in: 0.11 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content 
dog allergies remedies cialis 20 mg chilblain remedies


Privacy Policy
Terms of Use

User Functions

Login