[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

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

1088.0. "Importing Images ?" by RMPC07::NATI (Do you like Waterboys?) Tue Jul 11 1989 13:30

An our customer needs Decwindows handle images scanned by other devices.
These images are stored pixel after pixel, with every pixel rapresented by
a word containing from 0 to 255 (a grey scale from 0 to 254 and red = 255).

We defined a colormap with all the requested colours.
I read in the note 1026.6 that a translation must be done on the images data
before i can use them.

I'd like to know exactly what kind of translation we would do (I like to see
also some examples).

Thanks.
	Tonino

T.RTitleUserPersonal
Name
DateLines
1088.1STAR::MFOLEYRebel without a ClueTue Jul 11 1989 15:248

	This is probably better asked in one of the Imaging notesfiles..
	I know of one, VISUAL::IMAGEING but I'd say the IMAGE_SERVICES
	would be the better one.. Sorry, I don't know where that is.

						mike

1088.2EPIK::BUEHLERAn education teaches you why you need oneTue Jul 11 1989 18:094
    It's VISUAL::IMAGING (Mike had a typo) and IMAGE_SERVICES is on EDWIN::
    
John

1088.3VWSENG::KLEINSORGEToys 'R' UsTue Jul 11 1989 21:0711
    0-255, I hope it's in bytes instead of words.
    
    By and large, unless you are using a Lynx or a Firefox, you will need
    all of the colors on the system for the run of the mill 8 plane system.
    In which case, you'll find you can't allocate the color cells so you
    will need to create a color map, install it and then use it.  You
    can simply allocate all the colors and then load set the map up as
    you wish with no data translation needed.
    
    

1088.4OK, but help againRMPC07::NATIDo you like Waterboys?Thu Jul 13 1989 13:5211
Thank for .3, we make as you said and all works fine.
Now we have the problem of making the new colormap active
without the need of a "click" on the window (we already use the
"XSetWindowColormap", "XSynchonize","XFlush").
The application performs only output
over the whole screen, so the usage of the mouse is not required.
    
Thanks again.
		Tonino

1088.5XInstallColormap?SITBUL::KLEINSORGEToys 'R' UsThu Jul 13 1989 18:488
    
    How about: XInstallColormap
    
    Xlib Routines Reference Manual: Part 2, Window and Session Manager
    Routines.  I think that this is what forces a colomap to be installed.
    
    

1088.6Don't XInstallColormap!!!!!!!!!!!!!GVRIEL::SCHOELLERWho's on first?Fri Jul 14 1989 14:1113
Applications SHOULD NOT CALL XInstallColormap.  That is a function provided for
window managers.  What you should do is use one of the possible means to force
input focus to your window.  With input focus, the window manager should install
your colormap.  Clicking is currently necessary because your window doesn't
take focus at startup.

You should also not assume that you will get the whole screen (unless you are
using override redirect windows).  Many window managers will not give you the
whole screen or, even if you get the whole screen, the user may shrink the
size of your window.

Dick

1088.7VWSENG::KLEINSORGEToys 'R' UsFri Jul 14 1989 16:4311
    
    From .4:
    
    "The application performs only output
    over the whole screen, so the usage of the mouse is not required."
    
    Sounds pretty silly to do it indirectly by getting the imput focus.
    The fact that window managers typically do this function shouldn't
    preclude it's use by other applications.
    

1088.8Anti-social behaviorGVRIEL::SCHOELLERWho's on first?Fri Jul 14 1989 17:1717
And what if the user chooses to push the application window behind or the
application is run under a window manager that does not let it take the
whole window?  The only way that XInstallColormap can be used safely by
an application is if it is putting an override redirect window over the whole
screen.  In that situation other windows would never have the opportunity to
try to become active.  Of course, that situation is extremely anti-social and
violates the premise the the user is in control of the machine (rather than
the other way around).  Another aspect of covering the whole screen with
an override redirect window is that it would not matter if input focus was
taken since you couldn't see other windows anyway.

Starting with R4 there will be colormap focus in addition to input focus and
the application could probably just take that rather than input focus.  That is
how you would tell the window manager "use my colormap".

Dick

1088.9SITBUL::KLEINSORGEToys 'R' UsSat Jul 15 1989 10:214
    
    Depends on the society I guess.
    

1088.10Not anti-social, exclusiveROM01::NATIDo you like Waterboys?Thu Jul 20 1989 09:0016
Thanks for all the answers.
The application is not anti-social, because the need of the customer
was the following.
He must display continuosly upon the whole screen some recorded images,
for demo goals.
The people watching the demo (customer's customers) MUST ONLY SEE the
recorded images running on the screen, WITHOUT INTERFERENCES from
other applications.    
The application runs on another terminal and directs his calls
on the VAXstation. The application's menu appears on
the terminal, so the application doesn't need the mouse.

Thanks again.
	Tonino

1088.11GVRIEL::SCHOELLERWho's on first?Thu Jul 20 1989 10:478
Tonino,

Then, by all means, use an OverrideRedirect window and install the colormap
your self.  You should probably reinstall the default colormap when your
application exits (just to be nice to the rest of the world).

Dick

1088.12Agree with .11ROM01::NATIDo you like Waterboys?Thu Jul 20 1989 12:177
Ok, that was our final solution (.11).

Thanks again.

	Tonino