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

Home » Public Forums » archive » RGB image to 8 bit ??
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
RGB image to 8 bit ?? [message #17035] Thu, 09 September 1999 00:00 Go to previous message
Richard Tyc is currently offline  Richard Tyc
Messages: 69
Registered: June 1999
Member
I am a little confused with the following issue:

I am trying to animate a sequence of images from a IDLgrWindow. The
window image is drawn into a buffer object and then read later to
retrieve it.

ie.
oImgBuf = sState.oBuf->read()
oImgBuf->getproperty,data=animImage

At this point, the image is a bytarr[3,512,512]

In order to load it into Xinteranimate, it needs to be in
bytarr[512,512] form ?

So, how do you convert a RGB triple image into a single 8-bit image
while retaining
the colors (although lower resolution of color)

Do I have to convert each R,G,B triple into a 24 bit integer and then
bytscl it between 0-255 (then load anappropriate color table) ?

I was doing th following which produce a grey scale output (with color
table 0)

Xinteranimate, Frame = nimg, image=reform(animImage[0,*,*])

Thanks

Rich
  • Attachment: richt.vcf
    (Size: 0.29KB, Downloaded 96 times)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: object widgets
Next Topic: Sacrilegious but genuine question

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

Current Time: Fri Oct 10 16:00:59 PDT 2025

Total time taken to generate the page: 1.28004 seconds