User Tools

Site Tools


fScan Reference Manual, Chapter 2 (CmdLineOptions:Expr): rgb

rgb -- manipulate voxel color

usage: -expr rgb [flag] [WORDSIZE wdsiz]

The RGB expression can be used to convert to or from 24-bit (or 32-bit) RGB values.

Converting 8-bit or 16-bit

to gray-scale values or to new RGB values with rearranged color byte order. The RGB operator

When converting RGB values, the FLAG option can be used to specify the conversion method.
FLAG values:

  • 0 - convert as RGB magnitude (sqrt(r*r+g*g+b*b)); this is the default conversion
  • 7 - convert to maximum of Red or Green or Blue values
  • 15 - convert 24-bit RGB to 15-bit RGB (5 bits per color)
  • 16 - convert 24-bit RGB to 16-bit RGB (5 bits RED, 6 bits GREEN, 5 bits BLUE)
  • 123 - convert to BGR (blue is high byte, red is low byte)
  • 321 - convert to RGB (red is high byte, blue is low byte)
  • xyz - like above where X,Y,Z specify byte order; 1=BLUE, 2=GREEN, and 3=RED

See Also:
fScan Home,
fScan Manual,
Expression Command,
Manual Help

jvs/fscan/manual/chapter2/expression/rgb.txt · Last modified: 2020/02/18 20:38 by voyvodic