(&mut self, colors: u32)
| 86 | /// It's better to use `set_quality()` |
| 87 | #[inline] |
| 88 | pub fn set_max_colors(&mut self, colors: u32) -> Result<(), Error> { |
| 89 | if !(2..=256).contains(&colors) { |
| 90 | return Err(Error::ValueOutOfRange); |
| 91 | } |
| 92 | self.max_colors = colors as PalLen; |
| 93 | Ok(()) |
| 94 | } |
| 95 | |
| 96 | /// Range 0-100, roughly like JPEG. |
| 97 | /// |
no outgoing calls