{ } Raw JSON

bundles / skimage 0.26.1rc0.dev0+git20260530.b607368ff / skimage / color / colorconv / gray2rgba

function

skimage.color.colorconv:gray2rgba

source: /dev/scikit-image/src/skimage/color/colorconv.py:987

Signature

def gray2rgba(image, alpha = None, *, channel_axis = -1)

Summary

Create a RGBA representation of a gray-level image.

Parameters

image : array_like

Input image.

alpha : array_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_axis : int, optional

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

Returns

rgba : ndarray

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

Aliases

  • skimage.color.gray2rgba