Appendix C - Rayz Internal Operations Reference

This is the list of built-in image ops that can be accessed via plugins. It also includes the metadata parameters that can be passed.

Types and Constants

Channel Selection
    Bit flags in an Int32 word:
    RED      0x01
    GREEN    0x02
    BLUE     0x04
    ALPHA    0x08
    OTHER    0x10

Mask Types
    "ONOFF"
    "MIX"
    "NONE"

Mask Channel is a value from 0 to N, where 0 == Red, etc

Colorspace Types
    "HSV"
    "HSL"
    "HWB"
    "RGB"
    "YIQ"
    "YUV"
    "CLU"

Border Types
    "EDGE_BLACK"      // edges are black
    "EDGE_MIRROR"     // edges are a mirror of the current image
    "EDGE_BORDER"

Channel Sources       // potential values for channelswap
    "BLACK"
    "WHITE"
    "INPUT1_RED"      // first input, red channel
    "INPUT1_GREEN"
    "INPUT1_BLUE"
    "INPUT1_ALPHA"
    "INPUT1_5"          // first input, 5th channel
    "INPUT1_6"
    "INPUT1_7"
    "INPUT1_8"
    "INPUT1_9"
    "INPUT1_10"
    "INPUT1_LUM"      // first input, luminance value
    "INPUT2_RED"      // same for (optional) second input
    "INPUT2_GREEN"
    "INPUT2_BLUE"
    "INPUT2_ALPHA"
    "INPUT2_5"
    "INPUT2_6"
    "INPUT2_7"
    "INPUT2_8"
    "INPUT2_9"
    "INPUT2_10"

SepKernelShapes
    "BOX"
    "LINEAR"
    "QUADRATIC"
    "CUBIC"
    "GAUSSIAN"
    "ERODE"
    "DILATE"

SepKernelTypes
    "INTEGER"
    "FLOAT"

Edge Methods
    "ROBERTS"
    "SOBEL"
    "KIRSCH"

Filter Types
    "POINT_SAMPLE"
    "BILINEAR"
    "BEST_NATURAL"
    "BEST_CGI"
    "FILTERED"

Filter Names
    "BOX"
    "TRIANGLE"
    "QUADRATIC"
    "CUBIC"
    "CATMULL"
    "MITCHELL"
    "GAUSSIAN"
    "SINC"
    "BESSEL"
    "LANCZOS2"
    "LANCZOS3"
    "FILT_UNKNOWN"

Window Types
    "HANN"
    "HAMMING"
    "BLACKMAN"
    "KAISER"
    "UNKNOWN"

TransformOrderTypes
   "SRT"
   "RST"
   "TSR"
   "TRS"
   "STR"
   "RTS"

Commands and parameter names

For each internal op, these are the parameter names and types which may be set. For values of a certain type, for example a filter type, refer to the constants above. For example, to set a filter type for the resize operation, the metadata call would be
    cpiSetMetaString( parms, "filtertype", "BILINEAR" );

Values which are not set by the programmer default to their Rayz default value. Those defaults are not listed here, but they are the same as are seen in the GUI version of Rayz, for each of the given operations. For example, the default blur kernelshape can be seen by dropping a blur node and noting the kernelshape shown in the node parameter area.

Here are the names of the available RAYZ IMs, and the metadata parameters they take:


add
    no parameters


atop
    cpiSetMetaBool( parms, "premultiplya", Aflag );
    cpiSetMetaBool( parms, "premultiplyb", Bflag );


bitdepth
    cpiSetMetaInt32( parms, "bitdepth", bitdepth );
    cpiSetMetaFloat32( parms, "blackinred",    blackIn[0] );
    cpiSetMetaFloat32( parms, "blackingreen",  blackIn[1] );
    cpiSetMetaFloat32( parms, "blackinblue",   blackIn[2] );
    cpiSetMetaFloat32( parms, "blackinalpha",  blackIn[3] );
    cpiSetMetaFloat32( parms, "blackinother",  blackIn[4] );
    cpiSetMetaFloat32( parms, "blackoutred",   blackOut[0] );
    cpiSetMetaFloat32( parms, "blackoutgreen", blackOut[1] );
    cpiSetMetaFloat32( parms, "blackoutblue",  blackOut[2] );
    cpiSetMetaFloat32( parms, "blackoutalpha", blackOut[3] );
    cpiSetMetaFloat32( parms, "blackoutother", blackOut[4] );
    cpiSetMetaFloat32( parms, "whiteinred",    whiteIn[0] );
    cpiSetMetaFloat32( parms, "whiteingreen",  whiteIn[1] );
    cpiSetMetaFloat32( parms, "whiteinblue",   whiteIn[2] );
    cpiSetMetaFloat32( parms, "whiteinalpha",  whiteIn[3] );
    cpiSetMetaFloat32( parms, "whiteinother",  whiteIn[4] );
    cpiSetMetaFloat32( parms, "whiteoutred",   whiteOut[0] );
    cpiSetMetaFloat32( parms, "whiteoutgreen", whiteOut[1] );
    cpiSetMetaFloat32( parms, "whiteoutblue",  whiteOut[2] );
    cpiSetMetaFloat32( parms, "whiteoutalpha", whiteOut[3] );
    cpiSetMetaFloat32( parms, "whiteoutother", whiteOut[4] );


blur
    cpiSetMetaFloat32( parms, "kernelxscale", kernelxscale );
    cpiSetMetaFloat32( parms, "kernelyscale", kernelyscale );
    cpiSetMetaInt32( parms, "kernelshape", kernelshape );
    cpiSetMetaInt32( parms, "kerneltype", kerneltype );
    cpiSetMetaInt32( parms, "edging", edging );

    cpiSetMetaInt32( parms, "channelselect", chanselect );
    cpiSetMetaString( parms, "masktype", masktype );
    cpiSetMetaInt32( parms, "maskchannel", maskchannel );


brightness
    cpiSetMetaFloat32( parms, "brightness", brightness[0] );
    cpiSetMetaFloat32( parms, "brightnessred", brightness[1] );
    cpiSetMetaFloat32( parms, "brightnessgreen", brightness[2] );
    cpiSetMetaFloat32( parms, "brightnessblue",  brightness[3] );
    cpiSetMetaFloat32( parms, "brightnessalpha", brightness[4] );
    cpiSetMetaFloat32( parms, "brightnessother", brightness[5] );
    cpiSetMetaFloat32( parms, "offset",     offset[0] );
    cpiSetMetaFloat32( parms, "offsetred",     offset[1] );
    cpiSetMetaFloat32( parms, "offsetgreen", offset[2] );
    cpiSetMetaFloat32( parms, "offsetblue",  offset[3] );
    cpiSetMetaFloat32( parms, "offsetalpha", offset[4] );
    cpiSetMetaFloat32( parms, "offsetother", offset[5] );

    cpiSetMetaInt32( parms, "channelselect", chanselect );
    cpiSetMetaString( parms, "masktype", masktype );
    cpiSetMetaInt32( parms, "maskchannel", maskchannel );


channelswap
    cpiSetMetaInt32( parms,   "channelsout", numChans );
    cpiSetMetaFloat32( parms, "luminance",   luminance );
    cpiSetMetaString( parms,  "outputred",   channelSource );
    cpiSetMetaString( parms,  "outputgreen", channelSource );
    cpiSetMetaString( parms,  "outputblue",  channelSource );
    cpiSetMetaString( parms,  "outputalpha", channelSource );
    cpiSetMetaString( parms,  "output5",     channelSource );
    cpiSetMetaString( parms,  "output6",     channelSource );
    cpiSetMetaString( parms,  "output7",     channelSource );
    cpiSetMetaString( parms,  "output8",     channelSource );
    cpiSetMetaString( parms,  "output9",     channelSource );
    cpiSetMetaString( parms,  "output10",    channelSource );


chromakey
    cpiSetMetaFloat32( parms, "huemin", hue[0] );
    cpiSetMetaFloat32( parms, "huemax", hue[1] );
    cpiSetMetaFloat32( parms, "satmin", sat[0] );
    cpiSetMetaFloat32( parms, "satmax", sat[1] );
    cpiSetMetaFloat32( parms, "lummin", lum[0] );
    cpiSetMetaFloat32( parms, "lummax", lum[1] );
    cpiSetMetaFloat32( parms, "softness", softness );


color
    cpiSetMetaInt32( parms, "offsetx", offset[0] );
    cpiSetMetaInt32( parms, "offsety", offset[1] );
    cpiSetMetaInt32( parms, "sizex", size[0] );
    cpiSetMetaInt32( parms, "sizey", size[1] );
    cpiSetMetaInt32( parms, "channels", channels );
    cpiSetMetaInt32( parms, "bitdepth", bitdepth );
        // bitdepth is one of 8, 16 or 32

    cpiSetMetaFloat32( parms, "red", color[0] );
    cpiSetMetaFloat32( parms, "green", color[1] );
    cpiSetMetaFloat32( parms, "blue", color[2] );
    cpiSetMetaFloat32( parms, "alpha", color[3] );
    cpiSetMetaFloat32( parms, "other", color[4] );


contrast
    cpiSetMetaFloat32( parms, "contrast", contrast[0] );
    cpiSetMetaFloat32( parms, "contrastred", contrast[1] );
    cpiSetMetaFloat32( parms, "contrastgreen", contrast[2] );
    cpiSetMetaFloat32( parms, "contrastblue", contrast[3] );
    cpiSetMetaFloat32( parms, "contrastalpha", contrast[4] );
    cpiSetMetaFloat32( parms, "contrastother", contrast[5] );
    cpiSetMetaFloat32( parms, "pivot", pivot[0] );
    cpiSetMetaFloat32( parms, "pivotred", pivot[1] );
    cpiSetMetaFloat32( parms, "pivotgreen", pivot[2] );
    cpiSetMetaFloat32( parms, "pivotblue", pivot[3] );
    cpiSetMetaFloat32( parms, "pivotalpha", pivot[4] );
    cpiSetMetaFloat32( parms, "pivotother", pivot[5] );

    cpiSetMetaInt32( parms, "channelselect", chanselect );
    cpiSetMetaString( parms, "masktype", masktype );
    cpiSetMetaInt32( parms, "maskchannel", maskchannel );


convolve
    cpiSetMetaInt32( parms, "kernelx", ksizeX );
    cpiSetMetaInt32( parms, "kernely", ksizeY );
    // there is a helper function, cpiKernelToFloat() which
    // converts a Float array of values to a string to be
    // passed to the metadata
    cpiSetMetaString( parms, "kernelvalues", "1.0 0.0 ..." );
    cpiSetMetaInt32( parms, "border", border );
    cpiSetMetaInt32( parms, "sizex", sizex );
    cpiSetMetaInt32( parms, "sizey", sizey );
    cpiSetMetaInt32( parms, "offx", offx );
    cpiSetMetaInt32( parms, "offy", offy );
    cpiSetMetaString( parms, "kerneltype", kerneltype ); // float or int

    cpiSetMetaInt32( parms, "channelselect", chanselect );
    cpiSetMetaString( parms, "masktype", masktype );
    cpiSetMetaInt32( parms, "maskchannel", maskchannel );


diff
    no arguments


dilate
    // measured in pixels
    cpiSetMetaFloat32( parms, "magnitude", magnitude );
    cpiSetMetaFloat32( parms, "softness", softness );

    cpiSetMetaInt32( parms, "channelselect", chanselect );
    cpiSetMetaString( parms, "masktype", masktype );
    cpiSetMetaInt32( parms, "maskchannel", maskchannel );


dissolve
    cpiSetMetaFloat32( parms, "dissolve", dissolve );


edge
    cpiSetMetaInt32( parms, "border", border );
    cpiSetMetaInt32( parms, "method", method );
    cpiSetMetaInt32( parms, "sizex", sizex );
    cpiSetMetaInt32( parms, "sizey", sizey );
    cpiSetMetaInt32( parms, "offx", offx );
    cpiSetMetaInt32( parms, "offy", offy );

    cpiSetMetaInt32( parms, "channelselect", chanselect );
    cpiSetMetaString( parms, "masktype", masktype );
    cpiSetMetaInt32( parms, "maskchannel", maskchannel );


erode
    // measured in pixels
    cpiSetMetaFloat32( parms, "magnitude", magnitude );
    cpiSetMetaFloat32( parms, "softness", softness );

    cpiSetMetaInt32( parms, "channelselect", chanselect );
    cpiSetMetaString( parms, "masktype", masktype );
    cpiSetMetaInt32( parms, "maskchannel", maskchannel );


fliph
    cpiSetMetaInt32( parms, "sizex", sizeX );


flipv
    cpiSetMetaInt32( parms, "sizey", sizeY );


gamma
    cpiSetMetaFloat32( parms, "gamma",      gammavals[0] );
    cpiSetMetaFloat32( parms, "gammared",   gammavals[1] );
    cpiSetMetaFloat32( parms, "gammagreen", gammavals[2] );
    cpiSetMetaFloat32( parms, "gammablue",  gammavals[3] );
    cpiSetMetaFloat32( parms, "gammaalpha", gammavals[4] );
    cpiSetMetaFloat32( parms, "gammaother", gammavals[5] );

    cpiSetMetaInt32( parms, "channelselect", chanselect );
    cpiSetMetaString( parms, "masktype",     masktype );
    cpiSetMetaInt32( parms, "maskchannel",   maskchannel );


grain
    Grain is not included as a user-callable option in RAYZ 2.0


hueadjust
    cpiSetMetaString( parms, "colorspace", ColorSpace );
    cpiSetMetaFloat32( parms, "hue", Hue );
    cpiSetMetaFloat32( parms, "saturation", Saturation );
    cpiSetMetaFloat32( parms, "adjust", Adjust );
    cpiSetMetaString( parms, "masktype", masktype );
    cpiSetMetaInt32( parms, "maskchannel", maskchannel );


inside
    cpiSetMetaBool( parms, "premultiplya", premultA );


invert
    cpiSetMetaInt32( parms, "channelselect", chanselect );
    cpiSetMetaString( parms, "masktype", masktype );
    cpiSetMetaInt32( parms, "maskchannel", maskchannel );


monochrome
    cpiSetMetaFloat32( parms, "amount", amount );
    cpiSetMetaInt32( parms, "luminance", lum_type );

    cpiSetMetaInt32( parms, "channelselect", chanselect );
    cpiSetMetaString( parms, "masktype", masktype );
    cpiSetMetaInt32( parms, "maskchannel", maskchannel );


multiply
    no arguments


outside
    cpiSetMetaBool( parms, "premultiplya", premultA );


over
    cpiSetMetaBool( parms, "premultiplya", premultA );
    cpiSetMetaBool( parms, "premultiplyb", premultB );


resize
    cpiSetMetaFloat32( parms, "scalex", scalex );
    cpiSetMetaFloat32( parms, "scaley", scaley );

    cpiSetMetaFloat32( parms, "blurfactor", blurFact );
    cpiSetMetaFloat32( parms, "mitchellb", mitB );
    cpiSetMetaFloat32( parms, "mitchellc", mitC );
    cpiSetMetaFloat32( parms, "kaisera", kaisA );
    // enum FilterType
    cpiSetMetaString( parms, "filtertype", filtertype );
    // enum Filter
    cpiSetMetaString( parms, "filtername", filtername );
    // enum Window
    cpiSetMetaString( parms, "windowtype", windowtype );
    

rotate
    cpiSetMetaFloat32( parms, "rotatez", rotatez );
    cpiSetMetaFloat32( parms, "pivotx", pivotx );
    cpiSetMetaFloat32( parms, "pivoty", pivoty );

    cpiSetMetaFloat32( parms, "blurfactor", blurFact );
    cpiSetMetaFloat32( parms, "mitchellb", mitB );
    cpiSetMetaFloat32( parms, "mitchellc", mitC );
    cpiSetMetaFloat32( parms, "kaisera", kaisA );
    // enum FilterType
    cpiSetMetaString( parms, "filtertype", filtertype );
    // enum Filter
    cpiSetMetaString( parms, "filtername", filtername );
    // enum Window
    cpiSetMetaString( parms, "windowtype", windowtype );


rotate90
    // pass in the incoming full size
    // user needs to swap the new full size x & y
    cpiSetMetaInt32( parms, "sizex", sizex );
    cpiSetMetaInt32( parms, "sizey", sizey );


subtract
    no arguments


transform
    // enum TransformOrderType
    cpiSetMetaString( parms, "order", torder );
    cpiSetMetaFloat32( parms, "movex", tx );
    cpiSetMetaFloat32( parms, "movey", ty );
    cpiSetMetaFloat32( parms, "pivotx", px );
    cpiSetMetaFloat32( parms, "pivoty", py );
    cpiSetMetaFloat32( parms, "rotatez", rval );
    cpiSetMetaFloat32( parms, "scalex", sx );
    cpiSetMetaFloat32( parms, "scaley", sy );

    cpiSetMetaFloat32( parms, "blurfactor", blurFact );
    cpiSetMetaFloat32( parms, "mitchellb", mitB );
    cpiSetMetaFloat32( parms, "mitchellc", mitC );
    cpiSetMetaFloat32( parms, "kaisera", kaisA );
    // enum FilterType
    cpiSetMetaString( parms, "filtertype", filtertype );
    // enum Filter
    cpiSetMetaString( parms, "filtername", filtername );
    // enum Window
    cpiSetMetaString( parms, "windowtype", windowtype );


translate
    cpiSetMetaInt32( parms, "movex", movex );
    cpiSetMetaInt32( parms, "movey", movey );

    cpiSetMetaFloat32( parms, "blurfactor", blurFact );
    cpiSetMetaFloat32( parms, "mitchellb", mitB );
    cpiSetMetaFloat32( parms, "mitchellc", mitC );
    cpiSetMetaFloat32( parms, "kaisera", kaisA );
    // enum FilterType
    cpiSetMetaString( parms, "filtertype", filtertype );
    // enum Filter
    cpiSetMetaString( parms, "filtername", filtername );
    // enum Window
    cpiSetMetaString( parms, "windowtype", windowtype );


under
    cpiSetMetaBool( parms, "premultiplya", premultA );
    cpiSetMetaBool( parms, "premultiplyb", premultB );


zoom
    cpiSetMetaFloat32( parms, "pivotx", px );
    cpiSetMetaFloat32( parms, "pivoty", py );
    cpiSetMetaFloat32( parms, "scalex", sx );
    cpiSetMetaFloat32( parms, "scaley", sy );

    cpiSetMetaFloat32( parms, "blurfactor", blurFact );
    cpiSetMetaFloat32( parms, "mitchellb", mitB );
    cpiSetMetaFloat32( parms, "mitchellc", mitC );
    cpiSetMetaFloat32( parms, "kaisera", kaisA );
    // enum FilterType
    cpiSetMetaString( parms, "filtertype", filtertype );
    // enum Filter
    cpiSetMetaString( parms, "filtername", filtername );
    // enum Window
    cpiSetMetaString( parms, "windowtype", windowtype );


[Previous Page] [Next Page]
[Table of Contents] [Index]

Copyright © 2002 Silicon Grail Inc.
736 Seward Street, Hollywood, CA 90038