Re: 24 bit color without connecting to X server [message #18660] |
Fri, 21 January 2000 00:00 |
Liam E. Gumley
Messages: 378 Registered: January 2000
|
Senior Member |
|
|
whdaffer@my-deja.com wrote:
> On a X windows system, does anyone know how to do 24 bit color without
> connecting to the X server? All the TVs require true=[1|2|3] and this
> keyword only works to 'windows', not the Z buffer.
>
> I have a product I routinely make that requires me to do the following
> sort of thing.
>
> tv,image
> im=tvrd()
> mask 'im' with other images to create a composite image im2
> tv, im2
>
> Overplot vector graphics on im2.
>
> final_im=tvrd()
>
> write_jpeg, file, final_im
>
> In order to do all these 'tv's in 24 bit color, I have to connect to
> the X server. The Z buffer is only 8 bits deep. I realize that I could
> break everything done into its separate r/g/b planes, and then do each
> separately in the Z buffer, but that would be a pain for the vector
> graphics. I was just wondering if someone had a solution that involved
> less drudgery?
What if you wrote wrappers for WINDOW, TV, TVRD, and PLOT that (e.g.
ZWINDOW, ZTV, ZTVRD, ZPLOT) that accepted all the usual parameters and
keywords, but used the Z buffer as a display. You could have the wrapper
routine split out the R, G, B components of an an image into separate areas
of the Z buffer area. For example, if you wanted an 800 by 600 window, the
ZWINDOW would create a Z buffer sized at 800 by (3 x 600). ZTV would take a
true color input image and display the R, G, B component images in the
appropriate area of the Z buffer. Likewise, ZTVRD would read the R, G, B
component images from the appropriate areas of the Z buffer. ZPLOT would
have to be smart enough to decompose the R, G, B components of the COLOR
keyword, and plot each color component in the appropriate Z buffer area.
Just an idea....
Cheers,
Liam.
|
|
|
Re: 24 bit color without connecting to X server [message #18661 is a reply to message #18660] |
Fri, 21 January 2000 00:00  |
whdaffer
Messages: 10 Registered: January 2000
|
Junior Member |
|
|
In article <3888BFF5.DD09C84B@astro.cornell.edu>,
"John-David T. Smith" <jdsmith@astro.cornell.edu> wrote:
> whdaffer@my-deja.com wrote:
>>
>> Gentlefolk;
>>
>> (Dave, I'm CCing this to you because you are the 'color man!')
>>
>> On a X windows system, does anyone know how to do 24 bit color
without
>> connecting to the X server? All the TVs require true=[1|2|3] and
this
>> keyword only works to 'windows', not the Z buffer.
>>
>> I have a product I routinely make that requires me to do the
following
>> sort of thing.
>>
>> tv,image
>> im=tvrd()
>> mask 'im' with other images to create a composite image im2
>> tv, im2
>>
>> Overplot vector graphics on im2.
>>
>> final_im=tvrd()
>>
>> write_jpeg, file, final_im
>>
>> In order to do all these 'tv's in 24 bit color, I have to connect
to
>> the X server. The Z buffer is only 8 bits deep. I realize that I
could
>> break everything done into its separate r/g/b planes, and then do
each
>> separately in the Z buffer, but that would be a pain for the vector
>> graphics. I was just wondering if someone had a solution that
involved
>> less drudgery?
>>
>> My major motivation is the fact that this routine is run out of a
cron
>> job. If I'm not logged in on console when this job runs, the
connection
>> to the X server fails.
>>
>> So, maybe there's an alternative, a way to connect to the X server
>> when I'm not logged in on console.
>>
>
> How about plotting directly to postscript, and then converting the
postscript to
> JPEG externally? None of the tvrd's will work, but there are often
ways around
> using those.
>
> JD
>
> --
> J.D. Smith |*| WORK: (607)
255-5842
> Cornell University Dept. of Astronomy |*| (607) 255-6263
> 304 Space Sciences Bldg. |*| FAX: (607) 255-5875
> Ithaca, NY 14853 |*|
>
I'll give that some thought. I'm pretty sure the tvrds are integral,
but I may be wrong about that. I'll have to look at it now with this
thought in mind. I've also had some problem with converting to jpeg, or
any bitmapped format, it doesn't look as crisp as doing it directly to
jpeg does. But I'll have to investigate that as well since I never
really worked on this alternative and I may have dismissed it out of
hand.
What external programs would you suggest?
William
Sent via Deja.com http://www.deja.com/
Before you buy.
|
|
|
Re: 24 bit color without connecting to X server [message #18663 is a reply to message #18660] |
Fri, 21 January 2000 00:00  |
John-David T. Smith
Messages: 384 Registered: January 2000
|
Senior Member |
|
|
whdaffer@my-deja.com wrote:
>
> Gentlefolk;
>
> (Dave, I'm CCing this to you because you are the 'color man!')
>
> On a X windows system, does anyone know how to do 24 bit color without
> connecting to the X server? All the TVs require true=[1|2|3] and this
> keyword only works to 'windows', not the Z buffer.
>
> I have a product I routinely make that requires me to do the following
> sort of thing.
>
> tv,image
> im=tvrd()
> mask 'im' with other images to create a composite image im2
> tv, im2
>
> Overplot vector graphics on im2.
>
> final_im=tvrd()
>
> write_jpeg, file, final_im
>
> In order to do all these 'tv's in 24 bit color, I have to connect to
> the X server. The Z buffer is only 8 bits deep. I realize that I could
> break everything done into its separate r/g/b planes, and then do each
> separately in the Z buffer, but that would be a pain for the vector
> graphics. I was just wondering if someone had a solution that involved
> less drudgery?
>
> My major motivation is the fact that this routine is run out of a cron
> job. If I'm not logged in on console when this job runs, the connection
> to the X server fails.
>
> So, maybe there's an alternative, a way to connect to the X server
> when I'm not logged in on console.
>
How about plotting directly to postscript, and then converting the postscript to
JPEG externally? None of the tvrd's will work, but there are often ways around
using those.
JD
--
J.D. Smith |*| WORK: (607) 255-5842
Cornell University Dept. of Astronomy |*| (607) 255-6263
304 Space Sciences Bldg. |*| FAX: (607) 255-5875
Ithaca, NY 14853 |*|
|
|
|