pub struct Writer { /* private fields */ }
Expand description
Perform GIF writing
Implementations§
source§impl Writer
impl Writer
Encode collected frames
sourcepub fn add_fixed_color(&mut self, col: RGB8)
pub fn add_fixed_color(&mut self, col: RGB8)
Adds a fixed color that will be kept in the palette at all times.
This may increase file size, because every frame will use a larger palette. Max 255 allowed, because one more is reserved for transparency.
sourcepub fn write<W: Write>(
self,
writer: W,
reporter: &mut dyn ProgressReporter
) -> CatResult<()>
pub fn write<W: Write>( self, writer: W, reporter: &mut dyn ProgressReporter ) -> CatResult<()>
Start writing frames. This function will not return until Collector
is dropped.
outfile
can be any writer, such as File
or &mut Vec
.
ProgressReporter.increase()
is called each time a new frame is being written.
Auto Trait Implementations§
impl RefUnwindSafe for Writer
impl Send for Writer
impl Sync for Writer
impl Unpin for Writer
impl UnwindSafe for Writer
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more