|
|
||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||
|
This operation is only valid for canvases in raster formats. If the image is not a raster image it will be rasterized. |
|||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||
|
[C#]
[Visual Basic]
The code above draws an image onto a canvas. It then selects everything that is white and saves the completed image with selection-as-alpha-channel into a png. The input and output images are shown below.
|
|||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||
|
[C#]
[Visual Basic]
The code above selects all the white - or nearly white - pixels in the image and replaces them with red ones before saving the final output as a JPEG. The final output is shown below.
|
|||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||
|
The following code specifies rendering modes to modify existing selections. It will make all black and all white portions of an image blue. [C#]
[Visual Basic]
The first selection makes all portions of the image 100% opaque. The second would normally make all white portions of the image 100% opaque and all others 0% opaque. However because we're using the submin mode the effect is actually to subtract 100% from the current opacity where the image is white and to subtract 0% where the image is not white. The same effect occurs in the third line and black is made transparent.
|