color problems in the Z-buffer [message #35695] |
Tue, 01 July 2003 07:52 |
Marten.Blixt
Messages: 1 Registered: July 2003
|
Junior Member |
|
|
Hi all,
Searched through the group listings, and elsewhere, but didn't find
any useful
information. So I try posting.
I have a serie of color images (3 x X_Size x Y_Size) in png format,
which I wish to
modify slightly and then write back as indexed png images, and I'm
working on a
MAC OS X with IDL 5.6.
But the result look very bad, as if I only have like 12 color levels!?
My pseudo code goes something like
SET_PLOT, 'Z', /COPY ;write to the Z 'pseudo' buffer - no output to
terminal
DEVICE,SET_RESOLUTION=[XSize,YSize], Z_Buffer=0
FOR i = 0,N-1 DO BEGIN
image = READ_PNG(FileName[i])
TVIMAGE, image
;Some "non-invasive" image modification, like adding text with
XYOUTS
a = TVREAD()
TVLCT, r, g, b, /GET
image24[0,*,*] = r[a]
image24[2,*,*] = g[a]
image24[2,*,*] = b[a]
WRITE_PNG, ResultFileName[i], image24
ENDFOR
N is around 1000, so I thought that I would save time using the
Z-buffer. I've used a
similar code, but then writing to the X device and saving the image
using TVRD(True),
which works fine. What wrong do you think I do in the Z-buffer??
Thanks,
M�rten Blixt
|
|
|