Automated Presentation of directory src/exampleCode/X/pixmap/rgb2pix/

HUB | Up | Download | Pheedbak | Tree | Topic | A-Z | Search | Hot | New


README file from "rgb2pix" directory


             toolbox/src/exampleCode/X/pixmap/rgb2pix README
                                -------

rgb2pix takes rgb file(s) as input and creates X11 Pixmap(s) out of them.
These X11 pixmaps are used to create a Motif XmToggleButton label pixmap
(XmNlabelPixmap) and select pixmap (XmNselectPixmap).

A label pixmap is used to attach an image to an XmToggleButton that
represents the buttons intended function.  A select pixmap is used as an
image to represent the state of the button when it is selected (or 
pressed).  If, for instance, the toggle button where to represent a 
directory of files, the label pixmap of that button might show a closed 
manilla folder and the select pixmap might show an open manilla folder.

If a single rgb file is specified, only the label pixmap will be created 
for the toggle button.

rgb2pix was written for 2 reasons:

1) It serves as an example of how to read rgb (SGI imagelib image file 
   format) files.  This is handy for writing translations into other 
   image formats or to do image processing on the raw data.

2) It serves as a utility for easily creating pixmaps out of rgb image
   data.  rgb2pix makes has no reliance on XPM and so requires none
   of the XPM libraries or documentation.  XPM requires that an image
   be specified in ASCII which gets unruly for large images.  Bypassing
   XPM is convenient in that no other representation of the image is 
   necessary.  On SGI systems, rgb files are common and readily available.

Usage

The Makefile are provided does C compilation.  It can be edited to do
C++ instead to then compile the same source code files

To exectute rgb2pix:

	rgb2pix  <label RGB image file> [selected RGB image file]

Try running in the following manner for an idea of the intended
functionality:

   rgb2pix henry.rgb henryDown.rgb

Notes

Label and Selection pixmaps should be the same size.

Bugs 

This program does not handle rgb files with 2 bytes per pixel channel.  
See imginfo output to check the number of bytes per pixel channel on an 
image.  The number of bytes per channel is the "z" value.

Files of interest from "src/exampleCode/X/pixmap/rgb2pix" directory

Source

Documentation

Images

Reference


Select any combo of files you'd like to send yourself a compressed tar image of. Executables/scripts are indicated with a trailing `*' character. (Depending upon the browser, it may be necessary to hold down the Ctrl key to select/deselect disjoint items.) a compressed tar image of the above-selected items.
OR, ...
a compressed tar image of the entire rgb2pix directory.

Copyright © 1995, Silicon Graphics, Inc.