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 #41685 is a reply to message #41684] Tue, 09 November 2004 15:21 Go to previous messageGo to previous message
KM is currently offline  KM
Messages: 29
Registered: October 2004
Junior Member
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"

Thinking it could be a display issue (decomposed, true_color,
pseudo, etc.) I tested it by writing true_image out to a png and
jpeg, but they don't look write.

FYI, the above function I called toRGB, and my test code is:

loadct, 39
tv, congrid(indgen(16,16),640,512)
x = torgb()
;loadct, 0 ; tried w/ & w/o this commented
tv,x,/true ; produces color, but not same as last tv command
[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 16:24:36 PDT 2025

Total time taken to generate the page: 1.45465 seconds