Franco writes:
> yes the problem is resolution, and I've partially resolved it using
> your suggestion http://www.dfanning.com/graphics_tips/zfonts.html
> with the z-buffer.
>
> My code looks like this:
>
> thisDevice = !D.Name
> Set_Plot, 'Z'
> Device, Set_Resolution=[1200,1200]
> contour,u,x,y,levels=vals,/fill,c_colors=col,charsize=4.0,fo nt=1
> contour,v,x,y,nlevels=15,/noerase,c_thick=4,charsize=4.0,fon t=1
>
> snapshot = TVRD()
> Set_Plot, thisDevice
> window,1,xsize=300,ysize=300
> new= Rebin(snapshot, 300, 300)
> TV, new
> write_tiff, 'pl.tiff', reverse( new, 3 ), /append
>
> In grayscale it works simply great!!
> My problem now is with colors. If I load a color table, I make the
> following modification:
> snapshot = TVRD(true=1)
> Set_Plot, thisDevice
> window,1,xsize=300,ysize=300
> new= Rebin(snapshot, 3, 300, 300)
> TV, new, /true
> write_tiff, 'pl.tiff', reverse( new, 3 ), /append
>
> but now it doesn't work. It shows 3 small rough pictures.
> Unfurtunately I have not a lot of experience with the z-buffer
> and colors. Is there a simple solution?
> I'm using IDL 6.1 on a Mac Powerbook G4.
I don't answer questions about Macs. Who knows what is happening!?
No, just kidding.
The reason you are using the Z-buffer is to get away from
having to resize a 24-bit image, which will implement all sorts
of complications in your life. So that whole TVRD(TRUE=1) thing
concerns me.
I don't have time to try this (I'm teaching a class today),
but I would do the output and resizing in the Z-buffer as normal,
then I would load a color table (one that presumably resembles
the gray-scale table in its smoothness). Get those color vectors,
and run my re-sized snapshot through those vectors to produce
my 24-bit image for the TIFF file:
thisDevice = !D.Name
Set_Plot, 'Z'
Device, Set_Resolution=[1200,1200]
contour,u,x,y,levels=vals,/fill,c_colors=col,charsize=4.0,fo nt=1
contour,v,x,y,nlevels=15,/noerase,c_thick=4,charsize=4.0,fon t=1
new= Rebin(snapshot, 300, 300)
Set_Plot, thisDevice
LoadCT, 22
TVLCT, r, g, b, /Get
image24 = [ [[r[new]]], [[g[new]]], [[b[new]]] ]
write_tiff, 'pl.tiff', reverse( image24, 2 ), /append
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|