Module Pixels::NoAlphaChannel
In: lib/pixels.rb
Targa32 Targa16 TargaBase Targa24 Targa15 StandardError DataFormatError HasAlphaChannel NoAlphaChannel Pixels dot/f_2.png

Mix-in module for image types having no alpha channel.

It makes has_alpha? return false, and it emulates rgba_from_color and color_from_rgba.

Methods

Public Instance methods

Given separate [r, g, b, a] values, return the integer colour value.

This is a wrapper around color_from_rgb. The alpha channel is ignored.

Return true of the image has an alpha channel. Otherwise, return false.

Given an integer colour value, return separate [r, g, b, 255] values.

This is a wrapper around rgb_from_color. The alpha channel is always set fully opaque.

[Validate]