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

Home » Public Forums » archive » Converting 8-bit image + pallete to 24 bit image with alpha channel
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Converting 8-bit image + pallete to 24 bit image with alpha channel [message #19309] Thu, 09 March 2000 00:00
Ricardo Fonseca is currently offline  Ricardo Fonseca
Messages: 13
Registered: February 2000
Junior Member
Hi

I'm trying to convert an 8-bit grayscale image to a 24 bit image with an
alpha channel, mapping the colors of the 8-bit image through a palette.
Right now I'm doing it like this:

CT = 23
LoadCT,CT
TVLCT, rr, gg, bb, /get

Data = BytScl(Abs(Data), MAX = max, MIN = min)
s = Size(Data)
AlphaImage = BytArr(4, s[1], s[2])
AlphaImage[0,*,*] = rr(Data[*,*])
AlphaImage[1,*,*] = gg(Data[*,*])
AlphaImage[2,*,*] = bb(Data[*,*])
AlphaImage[3,*,*] = 128

Which works, but I was wondering if there was a more efficient way of doing
this. Can anyone help?

Thanks in advance, Ricardo
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Hi
Next Topic: Re: Can this be done using CALL_FUNCTION?

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

Current Time: Wed Oct 08 18:39:32 PDT 2025

Total time taken to generate the page: 0.00553 seconds