This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
jvs:fscan:manual:chapter2:expression:rgb [2014/08/04 16:03] 127.0.0.1 external edit |
jvs:fscan:manual:chapter2:expression:rgb [2023/02/23 18:43] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
**fScan Reference Manual, Chapter 2 (CmdLineOptions: | **fScan Reference Manual, Chapter 2 (CmdLineOptions: | ||
- | ===== rgb -- ===== | + | ===== rgb -- manipulate voxel color ===== |
- | | + | |
- | + | 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. | ||
+ | |||
+ | 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)); | ||
+ | * 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:**\\ | **See Also:**\\ | ||
[[jvs: | [[jvs: |