[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
Title: | DECWINDOWS 26-JAN-89 to 29-NOV-90 |
Notice: | See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit |
Moderator: | STAR::VATNE |
|
Created: | Mon Oct 30 1989 |
Last Modified: | Mon Dec 31 1990 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 3726 |
Total number of notes: | 19516 |
1487.0. "DIRECT COLOR ON FIREFOX" by CCIIS1::KRZEWINA () Tue Sep 26 1989 08:39
Direct Color on FireFox
My problem is about using color on FireFox. The images that I use came
from image data base of Orsay museum in Paris.
Dimensions are 1280x1024 and depth is 24 bits, 8 for each component
(red,green,blue). For me it is important to have full control over
the colormap because the problem of the light, and of a governing
colour in a picture is a very delicate problem.
I think I don't have an up-to-date reference manuel of decwindows library.
My first try is to use the RGB_BEST_MAP:
Display *dpy;
Window mywin,parent;
XStandardColormap *mycol;
XGrabServer(dpy);
stat = XGetStandardColormap (dpy,mywin,mycol,XA_RGB_BEST_MAP);
XUngrabServer(dpy);
but in VAX format i receive the following error message :
%XLIB-W-PROPUDEF, requested property is undefined
Is it possible to use this "RGB_BEST_MAP" ?
About the "turn-around" solution :
XVisualInfo visinfo1, *visinfo2;
Colormap colmap;
visinfo1.class = DirectColor ;
visinfo2 = XGetVisualInfo ( dpy, VisualClassMask|VisualScreenMask,
&visinfo1, &num);
if ( num <= 0)
{
printf("\n Error Visual type");
exit (-1);
}
colmap = XCreateColormap(dpy,parent,visinfo2->visual,AllocNone);
After that, I must allocate color planes, my doc says:
status = XAllocColorPlanes ( display,
colormap_id,
contig,
-> pixels_return,
num_colors,
num_reds,num_greens,num_blues,
-> pixels_return,
rmask_return,
gmask_return,
bmask_return)
I'm not sure it's good so I try all possibility, for example :
unsigned long pixel[num_colors];
stat = XAllocColorPlanes( dpy, colmap, contig,
&pixel[0],
num_colors,
8,8,8,
rmask,gmask,bmask);
but num_colors is to be equal to 255 or to 2**24 ???,
Everywhere each time I try I have stat=rmask=gmask=bmask=pixel[0:num_colors] = 0
In this case :
colmap = XCreateColormap(dpy,parent,visinfo2->visual,AllocAll);
inc = 65535 / 256;
for ( i=0;i<256;i++)
{
for ( j=0;j<256;j++)
{
for ( k=0;k<256;k++)
{
color[k].pixel = k + (j*256) + (i*65536);
color[k].red = (unsigned short) (k*inc);
color[k].green = (unsigned short) (j*inc);
color[k].blue = (unsigned short) (i*inc);
color[k].flags = DoRed | DoGreen | DoBlue;
}
XStoreColors(dpy,colmap,&color[0],255);
}
}
I think all this begin to be quite complicated !!
T.R | Title | User | Personal Name | Date | Lines |
---|
1487.1 | | DECWIN::FISHER | Burns Fisher 381-1466, ZKO3-4/W23 | Tue Sep 26 1989 11:26 | 17 |
| First off, RGB_BEST_MAP etc are not guaranteed to be there. They are just properties
that clients can use to share colormaps. You have to be willing to do without them.
In this case, no other client uses them. Note that if you use RGB_*, they are going
to be read-only. I take it you need to write.
I would think that you would be best off if you just created a DirectColor colormap
with AllocAll rather than mucking with AllocPlanes. You can look in the connection
setup info to find out which bits are for which primary. (Note that not all direct
color is 8/8/8. I think there is a direct color visual on the PMAX which is something
like 3/3/2, for example).
BTW, I am assuming that you really do need DirectColor so that you can do color
corrections without mucking with the image. If that is wrong and you just need
a non-colormapped 24-planes, you could use TrueColor a lot more easily.
Burns
|
1487.2 | It can be confusing | YUPPY::CONNOLLY | | Thu Sep 28 1989 05:22 | 17 |
| re .1
Burns, Just as an aside what do you use to enter your replies as
when i read .1 on my real VT340 i get alot of text_beyond_column_80
diamonds (for instance the first three lines finish :-
just prop|
without |
they are |
It does make it difficult to understand sometimes especially as
i dont know how to make my notes show me these columns unless i
reply and can then use TPU/EVE commands to shift the window. I cannot
turn the terminal into 132 column mode as i use Notes from a captive
ALLIN1 account!!!
Gerry
|
1487.3 | Getting even with ALLIN1 | GOFER::HARLEY | You can't fight in here, this is the War Room! | Thu Sep 28 1989 11:42 | 14 |
| re .2
> reply and can then use TPU/EVE commands to shift the window. I cannot
> turn the terminal into 132 column mode as i use Notes from a captive
> ALLIN1 account!!!
Try this:
Notes> Eve Set Width 132
Then ^Z out of EVE; you're terminal should now be set to 132 chars wide.
/Harley
|
1487.4 | sounds familiar | EPIK::WOLFE | Supercalifragilisticexpialidocious | Thu Sep 28 1989 14:52 | 9 |
| When last in Paris I visited the Musee D'Orsay and believe I saw the
images you are referring too. They were part of a system upstairs in
the museum library (running on HP gear) that let you view various
paintings/artwork. The instructions were all in French so I didn't
really know what it was all about :-) How did happen upon these images?
I'd like to see your display program when you are done with it.
pete
|
1487.5 | | DECWIN::FISHER | Burns Fisher 381-1466, ZKO3-4/W23 | Thu Sep 28 1989 15:04 | 7 |
| Sorry about that. I am using DECwindows notes, and I had
just switched from a 100 DPI screen to a 75. Since you specify
window sizes in pixels (grumble) the window was a lot wider
on the 75dpi screen and I did not notice.
Burns
|
1487.6 | Thanks | YUPPY::CONNOLLY | | Mon Oct 02 1989 09:21 | 11 |
| Sorry about the change of subject...
re .3 Works fine thanks alot
re .5 Burns, i wondered if it was something like that and you didnt
realise the problems you were causing.
Anyway thanks again
Gerry
|