Re: read/writing tiff files [message #35632 is a reply to message #35630] |
Sat, 28 June 2003 04:32   |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
Reimar Bauer wrote:
> Alexandra Panton wrote:
>
>> ok, this is probably a really simple question but having decided that
>> having 500+ images to process I needed to do some idl programming !
>> What i want to do is really simple - but as with all things and
>> computers simple rapidly progresses to the impossible :)
>>
>> Here's what I want to do:
>> I have a directory on my computer with all my images, - tiff files in,
>> I want to read them into an array - I can do this bit, apply my
>> processing steps (having trouble with that!), then write the output as
>> a tiff or jpg file.
>>
>> I have managed to do this to a fashion but it writes blank files -
>> very useful!
>>
>> my code so far...
>
> Dear Alexandra,
>
> there are a lot of tips available at Davids page
> www.dfanning.com
>
> Here in short how I would do this:
>
> stuff = 'f:\ftp_web_root\Recent\hawaii\GOES_9\all'
> file=file_search(stuff,'*.tif',COUNT=n)
> for i=0L,n-1 do begin
> result=query_image(file[i],info)
> print,info.dimensions
> help,info,/str
> img=read_image(files[i],red,green,blue)
> img=(330-(0.5*img))
> write_image,'d:\goes\hawaii\changed_'+files[i],'TIFF',red,gr een,blue
> endfor
typing bug, this always happens if you don't compile yourself such an
example
write_image,'d:\goes\hawaii\changed_'+file[i],'TIFF',red,gre en,blue
Reimar
>
> You should have a look at the info structure of the query function.
> I don't know in which way your images are color coded. I would suggest to
> read the tips on Davids page regarding color problems too.
>
> best regards
>
> Reimar
>
--
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
http://www.fz-juelich.de/icg/icg-i/
============================================================ ======
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
|
|
|