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

Home » Public Forums » archive » idl gif files and display by dos viewer
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: idl gif files and display by dos viewer [message #4224 is a reply to message #4153] Fri, 12 May 1995 00:00 Go to previous messageGo to previous message
pellet is currently offline  pellet
Messages: 12
Registered: October 1994
Junior Member
brooker@toka.ireq-ccfm.hydro.qc.ca wrote:
: I have a frame grabber card and a black and white camera. The frame grabber
: digitizes an image to 8 bits and saves to a binary file that I read with the
: following commands:

: a=bytarr(320,240)
: openr,lun,'image1.img',/get_lun
: readu,lun,a

: This image looks fine when I type: tv,a

: I now want to save to a GIF file so that I can view the image on a PC
: using the DOS viewer QPEG. IDL can do this by using the command:

: write_gif,a,'image1.gif'

: This seems to work fine because when I type the commands

: read_gif,'image1.gif',b
: tv,b

: the image looks like the original.

: The problem is that when I look at the same GIF file on a PC with the
: DOS viewer QPEG, it looks terrible. The image is still there but now it
: is mostly white.

: Has anybody else ever had this problem??


My guess is that the color table is not save properly with
the image.

Maybe you could try this after loading and viewing the
image:

...
tv, a

TVLCT, r, g, b, /GET ;Get current color table
WRITE_GIF, a, 'image1.gif', r, g, b ;Save image w/ color table

Hope this helps.

Jeff
pellet@INRS-ENER.UQuebec.CA
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Pixmap memory allocation question.
Next Topic: IDL> Looking for routine to list subdirectories.

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

Current Time: Fri Oct 24 17:07:24 PDT 2025

Total time taken to generate the page: 5.28012 seconds