Module retro_pixel::u32_ext[][src]

Module for code specific to u32 base images.

The channel order of the pixel value processing functions here is assumed to be AABBGGRR, which is what OpenGL uses. Note that other graphical systems might use 32 bit color but with the same channel order (notably, windows GDI), so for those situations you'd have to shuffle the channels or something.

In the future, I will attempt to make this able to unpack, use, and repack other color channel orderings.

Traits

WritableImageU32Ext

Extra functionality that's only available to images of u32 values.

Functions

linear_to_u32

The inverse of u32_to_linear.

u32_to_linear

Converts an RGBA u32 into a pseudo-linear brightness float array.