Remap image into a palette + indices. Returns the palette and a 1-byte-per-pixel uncompressed bitmap
(&mut self, image: &mut Image<'_>)
| 229 | /// |
| 230 | /// Returns the palette and a 1-byte-per-pixel uncompressed bitmap |
| 231 | pub fn remapped(&mut self, image: &mut Image<'_>) -> Result<(Vec<RGBA>, Vec<PalIndexRemap>), Error> { |
| 232 | let mut buf = Vec::new(); |
| 233 | let pal = self.remap_into_vec(image, &mut buf)?; |
| 234 | Ok((pal, buf)) |
| 235 | } |
| 236 | |
| 237 | /// Remap image into an existing buffer. Use [`remapped()`][Self::remapped] if you don't have a pre-allocated buffer to reuse. |
| 238 | /// |