... | ... | @@ -340,7 +340,7 @@ The render destination is specified as part of the creation of the image filter |
|
|
|
|
|
#### Modifying filter properties when rendering
|
|
|
|
|
|
At render time you can specify filter properties for different filters to modify their values in the "-renderfilterchain" smig "doaction". The render filter chain command can take a json object which has at a minimum a "cifilterproperties" key. The value for this key is an array of objects, each object contains three members. The "mifiltername" key which identifies the filter in the filter chain which has a property whose value you want to change. The other two members have keys "cifilterkey" and "cifiltervalue". The "cifilterkey" specifies the property key of the attribute of the filter you want to change, and the "cifiltervalue" which is the value that you want to assign to the filter property.
|
|
|
At render time you can modify filter properties of the filters in the filter chain. To modify their values the render filter chain command can take a json object which has a "cifilterproperties" key. The value for this key is an array of objects, each object contains three members. The "mifiltername" key which identifies the filter in the filter chain which has a property whose value you want to change. The other two members have keys "cifilterkey" and "cifiltervalue". The "cifilterkey" specifies the property key of the attribute of the filter you want to change, and the "cifiltervalue" which is the value that you want to assign to the filter property.
|
|
|
|
|
|
{
|
|
|
"cifilterproperties": [
|
... | ... | @@ -356,6 +356,8 @@ The following demonstrates rendering the filter chain after updating the "inputS |
|
|
|
|
|
smig doaction -renderfilterchain -object 3 -jsonstring '{"cifilterproperties":[{"cifilterkey":"inputScale","cifiltervalue":-0.0304,"mifiltername":"bumpdistortion"}]}'
|
|
|
|
|
|
All properties except the source for input images can be changed. This does not mean that input images do not change between each time the filter chain is rendered. If the input image is the output image of a filter earlier in the filter chain then if that output image changes then the input image will capture that change. If the input image is sourced from a "bitmapcontext" base object then whenever the contents of the "bitmapcontext" changes the filter chain object knows that it needs to update the image it uses next time the filter chain is rendered.
|
|
|
|
|
|
#### Setting the source and destination rectangles when rendering
|
|
|
|
|
|
When the filter chain is rendered to the destination then a source and destination rectangle can be specified but both are optional. If the source rectangle is not specified then the render command will be the extent of the of the output image of the image filter chain. This may not be the source rectangle that you want, for instance the blur filters extend the bounds of the image by the size of blur in each direction and you are likely not to want the extended bounds. Instead you can supply the source rectangle which is likely to be the rectangle of the input image for the filter.
|
... | ... | |