User Tools

Site Tools


jvs:cigal:manual:chapter3:rgb

CIGAL Reference Manual, Chapter 3 (Functions): rgb

RGB -- Convert color from one format to another

usage: tgt_image = rgb(srcimage,[options])

        DST         SRC                 I   J    NOUT/N1     FLG
        v_rgb = RGB(v_r,v_g,v_b)        3  1,2      1       CTOR    003
        v_rgb = RGB(v_byte(3))          3   1      1/3      BTOR    053
        v_rgb = RGB(v_icolor,bits)      3   2       1       ITOR    023
        v_rgb = RGB(v_long)             3   4       1       LTOR    043
        v_rgb = RGB(v_byte,lut)         3   1       1       PTOR    013
    v_byte(3) = RGB(v_icolor,bits)      1   2       3
    v_byte(3) = RGB(v_rgb)              1   3       3
    v_byte(3) = RGB(v_long)             1   4       3
    v_byte(3) = RGB(v_byte,lut)         1   1       3
       v_long = RGB(v_r,v_g,v_b)        4  1,2      1
       v_long = RGB(v_byte(3))          4   1      1/3
       v_long = RGB(v_icolor,bits)      4   2       1
       v_long = RGB(v_rgb)              4   3       1
       v_long = RGB(v_byte,lut)         4   1       1
     v_icolor = RGB(v_r,v_g,v_b,bits)   2  1,2      1
     v_icolor = RGB(v_byte(3),bits)     2   1      1/3
     v_icolor = RGB(v_rgb,bits)         2   3       1
     v_icolor = RGB(v_long,bits)        2   4       1
     v_icolor = RGB(v_byte,lut,bits)    2   1       1

       v_byte = RGB(v_icolor,flg,bits)  1   2       1
       v_byte = RGB(v_rgb,flg)          1   3       1
       v_byte = RGB(v_long,flg)         1   4       1

       v_byte = COLOR(v_r,v_g,v_b)      1  1,2      1
       v_byte = COLOR(v_byte(3))        2   1      1/3
       v_byte = COLOR(v_int(3))         1   2      1/3
       v_byte = COLOR(v_icolor,bits)    1   2       1
       v_byte = COLOR(v_rgb)            1   3       1
       v_byte = COLOR(v_long)           1   4       1

RGB is used to convert separate red, green, and blue values to 16, 24, or 32 bit RGB combined values or 8 but pseudo-color values. In can also be used to extract red, green or blue values from RGB.

See Also:
CIGAL Home, CIGAL Manual, Functions List, Manual Help

jvs/cigal/manual/chapter3/rgb.txt · Last modified: 2023/02/23 18:43 (external edit)