Function repng::meta::palette
[−]
[src]
pub fn palette<W: Write, F>(enc: &mut Encoder<W, F>, rgb: &[u8]) -> Result<()>
Specify the color palette for an indexed image.
The first 3 bytes specify the RGB value represented by index 0, the next 3 bytes specify the RGB value represented by index 1, and so on.
Panics
Panics if the array's length isn't a multiple of 3, or if there are more than 256 palette entries.