comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: RGB image to 8 bit ??
items: Re: RGB image to 8 bit ??
items: Re: RGB image

RGB image to 8 bit ??
type: item
description: 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
creator: Richard Tyc
date: 1999-09-09T07:00:00-00:00

Re: RGB image to 8 bit ??
type: item
description: Liam Gumley (Liam.Gumley@ssec.wisc.edu) writes: > That said, I also think a 24-bit capable version of XInteranimate would > be useful. You know, as soon as I sent that post yesterday I started worrying that I may had gotten it wrong. I remember wanting to display 24-bit images in XInteranimate, and I remember looking at the code, and I remember that whatever I did was very simple, but I couldn't q-u-i-t-e remember what I actually did. So I went back this morning and looked at the code. And it turns out I did *nothing*! That's right. XInterAnimate is *already* 24-bit image compliant. [Sorry, RSI. :-(] Actually, it is the fact that XInterAnimate uses the Device Copy technique of transferring each image frame from its pixmaps to the display window that makes it so. This technique doesn't care *what* is in the window, it just transfers the "bits", if you like. So, you use XInterAnimate with 24-bit images, all you have to do is load them properly: XInterAnimate, /ShowLoad, Set=[512, 512, 15] For J=0, 14 DO BEGIN TV, image24[j], True=1 XInterAnimate, Frame=j, Window=!D.Window EndFor XInterAnimate It is true that you can't use the IMAGE keyword, and that is a shame, but this may be the preferred solution anyway, since you don't have to do any COLOR_QUANing at all to use it. Cheers, David -- David Fanning, Ph.D. Fanning Software Consulting Phone: 970-221-0438 E-Mail: davidf@dfanning.com Coyote's Guide to IDL Programming: http://www.dfanning.com/ Toll-Free IDL Book Orders: 1-888-461-0155
creator: davidf
date: 1999-09-10T07:00:00-00:00

Re: RGB image to 8 bit ??
type: item
description: I ended up taking your first advice and created Xinteranimate24 which was very simple. In the CW_Animate_Load procedure I needed to add the true keyword (I actually created CW_ANIMATE_LOAD24 which Xinteranimate24 calls) and change some array subscripts on image size where it was grabbing size[1] and size[2] for xsize and ysize which now requires size[2] and size[3] since size[1] is 3. I'll try your idea as well. Thanks Rich David Fanning wrote in message ... > Liam Gumley (Liam.Gumley@ssec.wisc.edu) writes: > >> That said, I also think a 24-bit capable version of XInteranimate would >> be useful. > > You know, as soon as I sent that post yesterday I started worrying > that I may had gotten it wrong. I remember wanting to display > 24-bit images in XInteranimate, and I remember looking at the > code, and I remember that whatever I did was very simple, but > I couldn't q-u-i-t-e remember what I actually did. So I went > back this morning and looked at the code. And it turns out > I did *nothing*! > > That's right. XInterAnimate is *already* 24-bit image > compliant. [Sorry, RSI. :-(] > > Actually, it is the fact that XInterAnimate uses the > Device Copy technique of transferring each image frame > from its pixmaps to the display window that makes it > so. This technique doesn't care *what* is in the window, > it just transfers the "bits", if you like. > > So, you use XInterAnimate with 24-bit images, all you have > to do is load them properly: > > XInterAnimate, /ShowLoad, Set=[512, 512, 15] > For J=0, 14 DO BEGIN > TV, image24[j], True=1 > XInterAnimate, Frame=j, Window=!D.Window > EndFor > XInterAnimate > > It is true that you can't use the IMAGE keyword, and that > is a shame, but this may be the preferred solution anyway, > since you don't have to do any COLOR_QUANing at all to use > it. > > Cheers, > > David > > -- > David Fanning, Ph.D. > Fanning Software Consulting > Phone: 970-221-0438 E-Mail: davidf@dfanning.com > Coyote's Guide to IDL Programming: http://www…
creator: Richard Tyc
date: 1999-09-13T07:00:00-00:00

Re: RGB image
type: item
description: Dominik Paul wrote: > I tried a lot of thinks to display an RGB picture. It is in an array pic[3, > 100, 100] with the 3 color channels and the size 100 square 100. > Does somebody know a posibility to draw this 3 channels in one picture like > an real RGB picture. Grab IMDISP from http://www.gumley.com/PIP/Free_Software.html Cheers, Liam. Practical IDL Programming http://www.gumley.com/
creator: Liam E. Gumley
date: 2002-01-10T20:18:36-00:00

Re: RGB image
type: item
description: Dominik Paul (dpaul@ukl.uni-freiburg.de) writes: > I tried a lot of thinks to display an RGB picture. It is in an array pic[3, > 100, 100] with the 3 color channels and the size 100 square 100. > Does somebody know a posibility to draw this 3 channels in one picture like > an real RGB picture. > Help would be very nice. I would suggest one of these methods: TVImage, picture IMDisp, picture PlotImage, picture You can find them in the usual places. :-) Cheers, David -- David W. Fanning, Ph.D. Fanning Software Consulting Phone: 970-221-0438, E-mail: david@dfanning.com Coyote's Guide to IDL Programming: http://www.dfanning.com/ Toll-Free IDL Book Orders: 1-888-461-0155
creator: David Fanning
date: 2002-01-10T20:27:23-00:00

Re: RGB image
type: item
description: "Dominik Paul" <dpaul@ukl.uni-freiburg.de> wrote in message news:a1kkuo$170$1@n.ruf.uni-freiburg.de... > Hi there, > > I tried a lot of thinks to display an RGB picture. It is in an array pic[3, > 100, 100] with the 3 color channels and the size 100 square 100. > Does somebody know a posibility to draw this 3 channels in one picture like > an real RGB picture. I may be missing something that my learned colleagues Liam and David are seeing, but perhaps what you want is simply: TV, /True, pic Cheers, -- -Dick Dick Jackson / dick@d-jackson.com D-Jackson Software Consulting / http://www.d-jackson.com Calgary, Alberta, Canada / +1-403-242-7398 / Fax: 241-7392
creator: Dick Jackson
date: 2002-01-11T17:03:47-00:00

Re: RGB image
type: item
description: Dick Jackson (dick@d-jackson.com) writes: > I may be missing something that my learned colleagues Liam and David are > seeing, but perhaps what you want is simply: > > TV, /True, pic Well, at least until you want PostScript output. :-) Cheers, David -- David W. Fanning, Ph.D. Fanning Software Consulting Phone: 970-221-0438, E-mail: david@dfanning.com Coyote's Guide to IDL Programming: http://www.dfanning.com/ Toll-Free IDL Book Orders: 1-888-461-0155
creator: David Fanning
date: 2002-01-11T17:18:31-00:00

Re: RGB image
type: item
description: David Fanning (david@dfanning.com) writes: > Well, at least until you want PostScript output. :-) Whoops! Should have been *understandable* PostScript output. Cheers, David -- David W. Fanning, Ph.D. Fanning Software Consulting Phone: 970-221-0438, E-mail: david@dfanning.com Coyote's Guide to IDL Programming: http://www.dfanning.com/ Toll-Free IDL Book Orders: 1-888-461-0155
creator: David Fanning
date: 2002-01-11T17:20:26-00:00