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

Home » Public Forums » archive » read/writing tiff files
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
read/writing tiff files [message #35635] Sat, 28 June 2003 03:41
alex_panton is currently offline  alex_panton
Messages: 5
Registered: June 2003
Junior Member
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...

stuff = ('f:\ftp_web_root\Recent\hawaii\GOES_9\all')
store = ('d:\goes\hawaii')

cd, stuff
files=file_search('*.tiff', COUNT=numFiles);searches for the tiff
files;
x=0
while(x le numFiles-1) do begin ;while loop so i do every image in the
directory;
cd,stuff
input=read_tiff(files(x)) ;reads the tiff file into array;
dimensions=size(input, /dimensions)
print, dimensions ;prints image dimensions;

;input=(330-(0.5*input)); ;this is the processing i want to apply
though i know its not as simple as that but thats for next week!)
outname=input+'bt' ;output file name;
cd, store
openw,1, outname ;opens a file with outname filename;
write_tiff,input ;writes a tiff file of input array
close,1
free_lun,1
x=x+1 ;loops round to next image;
endwhile
end

When i run this it stops at the openw command with a type conversion
error: Unable to convert given STRING to Byte.

If anyone can give me some advice on what i am doing wrong or where i
can read some helpful tips (i have read most of the online sites
posted here)

Thanks in advance
kind regards

alex
[Message index]
 
Read Message
Previous Topic: Re: resolve_routine and the IDL search path
Next Topic: Jeffries-Matusita(JM) distance

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

Current Time: Sat Oct 11 03:12:48 PDT 2025

Total time taken to generate the page: 1.68137 seconds