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

Home » Public Forums » archive » Image question.
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Image question. [message #2989 is a reply to message #2909] Thu, 13 October 1994 08:41 Go to previous messageGo to previous message
8015 is currently offline  8015
Messages: 52
Registered: November 1993
Member
In article <1994Oct12.112035.26360@msuvx1.memphis.edu>,
PAVAN VEMULAKONDA <pvemulakonda@cc.memphis.edu> wrote:
> How can I read an image on the screen into an integer array and store it as
> a data file (im.dat) consisting of integer data. Plz somebody help me with
> this.
>
> Thanks.

If the image is already on the display, use the the TVRD() function.
Something like:

IDL> image = tvrd() ; options for size and 24-bit may be included here
IDL> s = size(image) ; get the size of the image array
IDL> intimage = intarr(s(1), s(2)) ; create an int array using sizes
The '*' below allow you to fill the intimage array rather than recreate it
IDL> intimage(*,*) = image(*,*)
IDL> openw, lun, 'im.dat', /get_lun ; open the output file
IDL> writeu, lun, intimage ; write the image to the output file
IDL> free_lun, lun ; free the lun

Mike Schienle Hughes Santa Barbara Research Center
8015@sbsun0010.sbrc.hac.com 75 Coromar Drive, M/S B28/87
Voice: (805)562-7466 Fax: (805)562-7881 Goleta, CA 93117
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: rounding function
Next Topic: Bug regarding plot limits when setting RANGE and TICKS

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

Current Time: Thu Oct 09 20:23:37 PDT 2025

Total time taken to generate the page: 0.63938 seconds