RGBA32

Index:
ppm2rgba
rgba2ppm
rgbaadd
rgbaaddB
rgbaautocrop
rgbadither
rgbafade
rgbamerge
rgbamergeB
rgbaquant
rgbascale
rgbascaleB
rgbascaleF
rgbasub
rgbasubB
rgbatrans

trouble-
shooting

the RGBA32 manual and style guide: rgbafade

Command line:

rgbafade [inputfile] upperleft upperright lowerleft lowerright

Usage:

Rgbafade can take input either from stdin or from a file specified on the command line. If a filename appears on the command line, stdin will not be checked for input. Output is directed to stdout and errors to stderr.

Four arguments must be specified on the command line (after the optional input file) to specify the desired opaqueness modification at each corner; the value will blend smoothly from one corner to the others. Opaquenesses can be specified as floating point numbers (0. is fully transparent while 1. is fully opaque) or as percentages (0% is fully transparent and 100% is fully opaque). The modification is in addition to any opaqueness levels already specified in that file's alpha channel. That is, if a file is already entirely 50% opaque, specifying a corner value of 50% results in an output opaqueness of 25% at that corner.

Levels less than zero and greater than fully opaque (100% or 1.) can be used; any resulting out of range alpha-channel value is clamped to the range 0. to 1. (100%). In this way, a file that fades from 50% to 25% can be modified to fade from 100% to 0% (using values of 200% and 0% at the corners), or a file can be entierly opaque or transparent for some distance (see the examples below).

Examples:

Note that the images as shown in the browser are GIFs; the actual rgba output is converted to GIF such that the browser can display it. Warning; Web browsers running on less than a 16 bit display (less than 65K colors) will almost certainly substitute colors wildly and/or dither the below images. This will degrade the image quality considerably.

rgbafade text.rgba 100% 50% 50% 0%
bolt.rgba rgbafade bolt.rgba 100% 50% 50% 0% stdout

rgbafade text.rgba 200% 50% 50% -150%
bolt.rgba rgbafade bolt.rgba 200% 50% 50% -150% stdout

rgbafade bolt.rgba 200% 200% 100% 100%
bolt.rgba (50% transparent) rgbafade bolt.rgba 200% 200% 100% 100% stdout

rgbafade text.rgba 100% 0% 0% 0% | rgbamergeB bolt.rgba
bolt.rgba text.rgba rgbafade text.rgba 100% 0% 0% 0% rgbamergeB bolt.rgba stdout

Bugs:

In the interest of simple command-line parsing, all arguments that begin with a digit, decimal point or unary minus are considered to be numeric arguments (not filenames). Therefore, the input file cannot begin with any of these else it would be mistakenly taken as the first numeric argument.


These pages are copyright (C) 1994-1997 Xiphophorus. All rights reserved.