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

Home » Public Forums » archive » Re: 8 to 24 bit conversion
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: 8 to 24 bit conversion [message #41679 is a reply to message #41678] Tue, 09 November 2004 18:17 Go to previous messageGo to previous message
KM is currently offline  KM
Messages: 29
Registered: October 2004
Junior Member
On Tue, 9 Nov 2004, Ken Mankoff wrote:

> On Tue, 9 Nov 2004, Liam Gumley wrote:
>>
>> Ken Mankoff wrote:
>>>
>>> I am trying to convert an 8 bit image created in the Z buffer to
>>> a 24 bit image. Is this possible? I would think so. But I am
>>> having trouble getting it to work.
>>>
>>> I based my code off of this algorithm:
>>> http://groups.google.com/groups?hl=en&lr=&selm=c0jq0 j%24i40%241%40nntp6.u.washington.edu
>>> But I don't want to use the COLOR_QUAN bit of code that reduces
>>> it back to 8 bits.
>>>
>>> image = TVRD()
>>> TVLCT, R, G, B, /GET
>> dims = size(image, /dimensions)
>> true_image = bytarr(3, dims[0], dims[1])
>> true_image[0, *, *] = r[image]
>> true_image[1, *, *] = g[image]
>> true_image[2, *, *] = b[image]
>
> OK, that is quite a bit more succinct. But the colors still aren't
> right when I "TV, true_image, /true"
>

OK, that code is correct. My mistake was that I was testing it in
the X buffer, not Z buffer, so the TVRD() command wasn't working
properly (24 bit display and all that...).

Thanks,

-k.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: z-buffer and /noerase ?
Next Topic: Advection routine?

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

Current Time: Sat Oct 11 08:34:51 PDT 2025

Total time taken to generate the page: 0.88192 seconds