comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: gif and program in one save file?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: gif and program in one save file? [message #13700] Fri, 04 December 1998 00:00
Eric Frans is currently offline  Eric Frans
Messages: 13
Registered: October 1998
Junior Member
test!
Re: gif and program in one save file? [message #13735 is a reply to message #13700] Wed, 02 December 1998 00:00 Go to previous message
menakkis is currently offline  menakkis
Messages: 37
Registered: June 1998
Member
Renata McCoy <renata@atmos.colostate.edu> wrote:
> I'd like to include gif image in the distribution of a widget program to
> be saved with save procedure. I want it to be platform independent.
> Is there any way of avoiding using path to read gif file?
> Can I somehow save the routines together with image variables in one
> save file?
> The idea is to distribute only one file that someone can double click on
> and see gif image and have routines restored.

I don't really know about saving the GIF (as an array and a LUT, say) along
with your code in a single .SAV file. Perhaps if you compiled your program
as a "main level" program (one that executes when you just type .run) you
could do this, but it's not an elegant way to go about things, in my opinion.
Do you also have to consider runtime IDL? (I have too little experience
with RT to guess if it would be even remotely possible with RT.)

A tantalysing alternative is to keep the gif image as a file and insist that
it be installed in the same directory as your program, then to use
ROUTINE_INFO() from within your program to find out where it lives.
Unfortunately this ** DOESN'T WORK ** for .SAV files. (Hello, RSI, I would
really like it if this DID work, or if there was a functionally similar
alternative.)

Or... Insist that your program and its files be kept together but also insist
that their directory be put into IDL's search path. (This is reasonable. In
fact it's necessary.) Then you can use the following rather messy little
piece of work to find your file (Unix and Windows only):
ftp://demsyd.syd.dem.csiro.au/pub/mmtg/idl/huntfile.pro (We're renaming our
FTP server soon, but the above address should still be good for a couple of
days.)

By this time I must be starting to get on the nerves of one or two regulars
out there by being so undecided. Only one more suggestion to go... This
one's quite popular, and it has the considerable advantage that it leaves
little to chance. First of all, absolutely insist that your program and
files be stored in a specific directory (you dictate its name) under IDL's
lib directory. e.g., Call it "mystuff". Then from within your program you
can set up the path to your file "mygif.gif", say, with
FILEPATH('mygif.gif',subdir=['lib','mystuff']) (BTW, FILEPATH() just dresses
up a path for the current platform. It doesn't verify anything.)


Peter Mason

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Re: gif and program in one save file? [message #13738 is a reply to message #13735] Wed, 02 December 1998 00:00 Go to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Renata McCoy wrote:

> Hi,
>
> I'd like to include gif image in the distribution of a widget program to
> be saved with save procedure. I want it to be platform independent.
> Is there any way of avoiding using path to read gif file?
> Can I somehow save the routines together with image variables in one
> save file?
> The idea is to distribute only one file that someone can double click on
> and see gif image and have routines restored.
>
> Thanks for any ideas,
> Renata
> --
> ***

Dear Renata,

procedure sav files are dependent on the platform and the Operation System.
I believe you will need two files.

R.Bauer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: 5.2 looks nice
Next Topic: Re: HASP service, NT4 SP4, and laptops

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 20:03:14 PDT 2025

Total time taken to generate the page: 0.00829 seconds