Re: LZW in IDL [message #39715] |
Thu, 10 June 2004 06:04  |
Haje Korth
Messages: 651 Registered: May 1997
|
Senior Member |
|
|
Andrew,
this will only check whether the dlm is present, but not whether it is
properly licensed. IMHO, you either have to parse the license file for
idl_tifflzw or use the LMGR routine.
Cheers,
Haje
"Andrew Cool" <andrew.cool@dsto.defence.gov.au> wrote in message
news:c6d70400.0406092052.5b0b8ed6@posting.google.com...
> Jonathan Joseph <jj21@cornell.edu> wrote in message
news:<ca7qcv$8bl$1@news01.cit.cornell.edu>...
>> Is there a way to query whether or not you have permission to write an
>> LZW compressed tiff file?
>>
>> I just found out that we actually do have the LZW licensing string in
>> the license.dat file. Unfortunately, It seems as though the number of
>> allowable LZW licenses is 1, while the number of allowable IDL licenses
>> is 8 - so if someone else has started IDL before you, they have the one
>> and only LZW license. I hope this was just a glitch in the creation of
>> the license.dat file. Another multi-user license we have seems to have
>> the same number of LZW licenses as IDL licenses.
>>
>> Regardless of whether I get our licensing working correctly, I would
>> like to be able to write the code so that it uses LZW if availalbe and
>> either no compression or packbits otherwise. Is there any way to query
>> whether the write_tiff command with compress=1 will work before calling
>> it? Currently, if LZW licensing is not available, the program will halt
>> at the write_tiff call (despite something I read on an RSI web page
>> which claimed that it would default to packbits).
>>
>> For example, if I send the code to collaborators, I want it to not crash
>> if they don't have LZW licensing. Even when the Unysis patents expire,
>> It will take some IDL maintenamce (at least a new license string, if not
>> a new version of IDL) to be able to use the functionality again.
>>
>> Thanks.
>>
>> -Jonathan
>
> Jonathon,
>
> Try issuing the command Help,/DLM,OUT=a
> This will return a list of all the DLMs that IDL knows about, even if
> they haven't been loaded in that session yet.
>
> IDL> help,/dlm,out=a
> IDL> gif=where(strmid(a,0,6) EQ '** GIF')
> IDL> print,a(gif)
> ** GIF - IDL GIF support (not loaded)
>
> If GIF reurns as -1, then you ain't got GIF available
>
> Cheers,
>
> Andrew
> DSTO, Adelaide, South Australia
|
|
|