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

Home » Public Forums » archive » Re: Screen dump to file - color problems
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: Screen dump to file - color problems [message #35792 is a reply to message #35791] Wed, 16 July 2003 15:16 Go to previous messageGo to previous message
Karl Schultz is currently offline  Karl Schultz
Messages: 341
Registered: October 1999
Senior Member
"Richard G. French" <rfrench@wellesley.edu> wrote in message
news:BB3B0ABB.ACC%rfrench@wellesley.edu...
> I'm running IDL5.6 on a Mac and I'm having trouble getting a screen dump
of
> a color image to a file - the colors are not working properly. I've tried
> using David Fanning's TVREAD(), I've tried FSC_WINDOW, and I've tried
every
> combination of decomposed=0, decomposed=1, TRUE=1, TRUE=0, etc with no
> success. Two symptoms - the background color of the window was supposed to
> be white, but it ends up being blue; the color table for the image itself
> seemsm to be wrapped over itself.
>
> Can someone help save my sanity? Here is what fails on my Mac running OS
> 10.2 and X11 Beta 3 - XFree86 4.2.1
>
> IDL> help,/dev
> Available Graphics Devices: CGM HP LJ NULL PCL PRINTER PS REGIS TEK X Z
> Current graphics device: X
> Server: X11.0, The XFree86 Project, Inc, Release 40201000
> Display Depth, Size: 24 bits, (2560,1024)
> Visual Class: TrueColor (4)
> Bits Per RGB: 8 (8/8/8)
> Physical Color Map Entries (Emulated / Actual): 256 / 256
> Colormap: Shared, 16777216 colors. Translation table: Enabled
> Graphics pixels: Combined, Dither Method: Ordered
> Write Mask: 16777215 (decimal) ffffff (hex)
> Graphics Function: 3 (copy)
> Current Font: <default>, Current TrueType Font: <default>
> Default Backing Store: Req from Server.
> IDL> print,!version
> { ppc darwin unix Mac OS X 5.6 Oct 26 2002 32 32}
>
>
> I tried just doing the actual TVRD() commands, following what is in the
guts
> of David Fanning's TVREAD:
>
>
> Device,decomposed=0 ; for the display of the image
> Loadct,3
> Window,xsize=400,ysize=400
> Erase,color=255 ; make white background
> Tvscl,dist(300),50,50
> Device,decomposed=1
> Result=tvrd(/TRUE)
> Write_jpeg,'tryit.jpg',result,/TRUE
> Device,decomposed=0
>
> When I display the jpeg file, I get a blue background and a green diamond
in
> the middle of the image.
>
> I'm willing to admit that I am blind and stupid! I'm using code that seems
> to have worked last year on whatever machine I might have been using, but
I
> can't get it to work now, and it is driving me crazy.

I ran your code sequence on a Mac running 10.2 and X11 Beta 0.2 and got the
right results.

I'm thinking that the problem might be that you are using X11 Beta 0.3.
Apple added 8-bit visual support in 0.3, but there are a lot of bugs in this
support that can cause some pretty strange problems with Direct Graphics.
We noticed a lot of problems with displaying image data. And if there are
problems with displaying the images, there certainly can be problems with
reading them back.

We've reported all this to Apple, but unfortunately, there will be no more
Beta X11 releases for 10.2. The soonest you'll be able to get a fix for
this is when 10.3 comes out and you'll have to upgrade to that.

In the meantime, you might try going back to Beta 0.2.

Karl
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Screen dump to file - color problems
Next Topic: How to find out the best fitted function ?

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

Current Time: Wed Oct 08 19:33:51 PDT 2025

Total time taken to generate the page: 0.00443 seconds