MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ gray_to_rgba() [2/2]

MAYAFLUX_API std::vector< float > MayaFlux::Kinesis::Vision::gray_to_rgba ( std::span< const float >  gray,
uint32_t  w,
uint32_t  h 
)

Convert single-channel gray to RGBA.

R, G, B are all set to the gray value. Alpha is 1.0f.

Parameters
grayGray float span, size must be w * h.
wImage width in pixels.
hImage height in pixels.
Returns
Interleaved RGBA float vector of length w * h * 4.

Definition at line 207 of file PixelOps.cpp.

208{
209 std::vector<float> out(static_cast<size_t>(w) * h * 4);
210 gray_to_rgba(gray, out, w, h);
211 return out;
212}
uint32_t h
Definition InkPress.cpp:28
void gray_to_rgba(std::span< const float > gray, std::span< float > dst, uint32_t w, uint32_t h)
Global threshold writing into caller-supplied buffer.
Definition PixelOps.cpp:138

References gray_to_rgba(), and h.

+ Here is the call graph for this function: