NOAA

Geophysical Fluid
Dynamics Laboratory

Skip to: [content] [navigation]
If you are using Navigator 4.x or Internet Explorer 4.x or Omni Web 4.x , this site will not render correctly!

Vis > image_printing > GFDL Visualization Guide: rgblegal

GFDL Visualization Guide: rgblegal

NAME

     rgblegal - adjusts an image's colors for proper display on video

SYNOPSIS

     rgblegal <-ntsc | -pal | -sat  percent>  [-legal  |  -illegal]  input.rgb
     output.rgb

DESCRIPTION

     rgblegal adjusts the saturation and luminance levels of the colors	in  an
     SGI  RGB  image  so that they fall	within the legal range for NTSC	or PAL
     video.  This insures a more accurate color	representation between what is
     seen  on  the computer monitor and	on a television.  Color	"legalization"
     is	sometimes necessary because computers can generate a far greater range
     of	 colors	than will fit in the bandwidth for video.  Without correction,
     this range	 discrepancy  which  can  produce  color  bleeding  and	 other
     undesirable results.

     The input image can be processed in one of	three ways:

     -ntsc   Legalizes the colors for output on	NTSC (North American) video.

     -pal    Legalizes the colors for output on	PAL (European) video.

     -sat    Performs a	global saturation adjustment on	all the	colors.	 It is
	     specified by a percentage where 1 is 100% of the original
	     saturation, .5 is 50%, etc.  The percentage cannot	be negative.

     The -ntsc and -pal	options	only adjust the	pixels	which  have  "illegal"
     values;  the  legal  ones	are  left  alone.  As a	result,	adjusted color
     regions may acquire colors	used in	other regions of the image and may  no
     longer  be	 unique.   Therefore, when using colors	to represent different
     things in an image, the colors should be as different  (and  unsaturated)
     as	 possible  if  output  to  video  is  needed.	Objects	which are only
     distinguised by different shades of the same color	may all	take on	 about
     the same color after processing.

     If	either the -ntsc or -pal option	is used	then two other options	become
     available	to modify the processing, otherwise the	entire corrected image
     will be output:

     -legal	Output only the	pixels which have legal	color values.  All the
		illegal	ones are set to	black.

     -illegal	Output only the	pixels which have illegal color	values.	 All
		the legal ones are set to black.

FILES

     ~hnv/pub/anim/rgblegal

SEE ALSO

     icop

AUTHORS

     Programming  by  Hans  Vahlenkamp	(hnv@gfdl.noaa.gov)	-  Geophysical	 Fluid
     Dynamics  Lab  /  NOAA,  Princeton	University Forrestal Campus.  Based on
     rlelegal by Wes Barris - Minnesota	Supercomputer Center, Inc.
smaller bigger reset
last modified: February 20 2004.