skimage2.color.gray2rgba#

skimage2.color.gray2rgba(image, alpha=None, *, channel_axis=-1)[source]#

Create a RGBA representation of a gray-level image.

Parameters:
imagearray_like

Input image.

alphaarray_like, optional

Alpha channel of the output image. It may be a scalar or an array that can be broadcast to image. If not specified it is set to the maximum limit corresponding to the image dtype.

channel_axisint, optional

This parameter indicates which axis of the output array will correspond to channels.

Added in version 0.19: channel_axis was added in 0.19.

Returns:
rgbandarray

RGBA image. A new dimension of length 4 is added to input image shape.