Important notice: the development of WideImage 1.0 branch is discontinued.
Please visit
http://wideimage.sourceforge.net for the new version of library and documentation.
This web site will remain accessible to serve as documentation for the old versions of the library.
For help on migration, please refer
to the
migration
guide.
wiImage::getChannels()
See:
List of operations
Signature
wiImage::getChannels( [channels] )
Parameters
- 1. array of channels (one or more of 'red', 'green', 'blue', 'alpha')
or
- 2. multiple parameters with channels
- result (wiTrueColorImage): image with only the specified channels
Description
Returns an image that only includes the specified channels. If no channels are selected, the resulting image is black. If all channels are specified, the result is equal to the original image.
Examples
$img = wiImage::
load('/path/to/an/image.png');
// get only red + alpha
$new =
$img->
getChannels(array('red',
'alpha'));
// get the blue channel
$new =
$img->
getChannels(array('blue'));
// get red and green, specify the channels outside an array:
$new =
$img->
getChannels('red',
'green');
CategoryDocApi
There are no comments on this page. [Add comment]