diff options
-rw-r--r-- | gifed/src/videogif.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gifed/src/videogif.rs b/gifed/src/videogif.rs index 27ec798..a5475cc 100644 --- a/gifed/src/videogif.rs +++ b/gifed/src/videogif.rs @@ -82,6 +82,12 @@ pub struct Frame { palette: Palette, } +impl From<Vec<Color>> for Frame { + fn from(flat: Vec<Color>) -> Self { + flat.as_slice().into() + } +} + impl From<&[Color]> for Frame { fn from(flat: &[Color]) -> Self { let flat_rgba = flat.as_rgba(); |