SHOWIMAGE(7) Miscellaneous Information Manual SHOWIMAGE(7)NAME
showimage - bitmap displayer, colormap changer
SYNOPSIS
showimage [ option ] [ file ... ]
DESCRIPTION
Showimage displays the bitmap contained in file in the top left corner of the current window. It goes to the next file when any character
is typed, exiting when there are no more files. The options, all of which require no file, are:
-c Load the standard Plan 9 colormap, if this is an 8-bit display. The standard colormap takes the value of a pixel byte and uses the
top 3 bits for red darkness, the next 3 bits for green darkness, and the final 2 for blue darkness. So 0 is white and 255 is black.
Exceptions: pixels 85 and 170 are intermediate grey values, so that 2-bit-per-pixel grey scale images look right.
-g Load the colormap with a linear grey scale, from 0 (white) to max (black).
-r Load the colormap with a reverse linear grey scale, from 0 (black) to max (white).
-mmapfile
Load the colormap from the file mapfile. See rgbpix(2) for the format.
-d Dump the current colormap to standard output in the format of rgbpix(2).
FILES
/lib/image
Some sample pictures.
SOURCE
/sys/src/cmd/showimage.c
SEE ALSO graphics(2), rgbpix(2), intro(9), getmap(9.1)
SHOWIMAGE(7)
Check Out this Related Man Page
RGBPIX(2) System Calls Manual RGBPIX(2)NAME
RGB, rgbpix, rdcolmap, wrcolmap - handle color screens
SYNOPSIS
#include <u.h>
#include <libc.h>
#include <libg.h>
ulong rgbpix(Bitmap *b, RGB rgb)
void rdcolmap(Bitmap *b, RGB *map)
void wrcolmap(Bitmap *b, RGB *map)
DESCRIPTION
Colors are described by the red, green, and blue light intensities, in an RGB datum:
typedef
struct RGB {
ulong red;
ulong green;
ulong blue;
} RGB;
Black is represented by zero in all three positions and white has the maximum unsigned long value in all three positions.
Some of the graphics functions, such as point (see bitblt(2)), take a pixel value argument, which is a single unsigned long. For a given
bitmap, rgbpix returns the pixel value with a color closest to the color represented by the rgb argument.
There is a colormap associated with each Bitmap. A colormap is an array of RGBs, of length 2^(2^ldepth), giving the colors for pixels 0,
1, 2, etc.
Rdcolmap reads the colormap for the given bitmap into the provided map, which must have enough space to hold it. Wrcolmap associates the
given colormap with the given bitmap, if possible. (The hardware might not allow this.)
SOURCE
/sys/src/libg
SEE ALSO graphics(2)BUGS
These functions work only for the screen bitmap. This interface will have to be refined for screens with more than 8 bits per pixel.
RGBPIX(2)
Man Page
3 More Discussions You Might Find Interesting
1. Post Here to Contact Site Administrators and Moderators
Sigs appear to be turned on, yet no ones shows up? What's the deal? Also I like sigs they help you distinguish between and remember people when all you have to know someone by is a little grey box. Therefor if they are intentionally turned off I "suggest" they be turned back on because I think they... (1 Reply)