struct

PNGGIF::Pixel

Inherits Struct < Value < Object

A single RGBA pixel. Channels are 0..255; a is opacity (255 = opaque).

Channels are stored as UInt8 (4 bytes/pixel instead of 4×Int32 = 16) so megapixel Bitmaps and the cellmap downscale / composite loops touch 4× less memory and stay cache-resident. Accessors keep the public Int32 (0..255) contract. Out-of-range values wrap (to_u8!); internal producers already emit 0..255.

Constructors

new(r : Int32, g : Int32, b : Int32, a : Int32 = 255)
Source

Instance methods

a=(v : Int32)
Source
b=(v : Int32)
Source
g=(v : Int32)
Source
r=(v : Int32)
Source