File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -931,9 +931,9 @@ fn encode_gif_impl<C, E>(
931931 let mut frame = Frame :: from_indexed_pixels ( width as u16 , height as u16 , indices, Some ( 0 ) ) ;
932932 frame. delay = ( ( i + 1 ) as f64 * 100.0 / frame_rate) . round ( ) as u16 - t;
933933 frame. dispose = if has_transparent {
934- DisposalMethod :: Any
935- } else {
936934 DisposalMethod :: Background
935+ } else {
936+ DisposalMethod :: Any
937937 } ;
938938 t += frame. delay ;
939939 encoder
@@ -994,7 +994,7 @@ where
994994 if width > 0 && height > 0 {
995995 for ( i, frame) in data. chunks_exact ( width * height) . enumerate ( ) {
996996 let frame: Vec < u8 > = frame. iter ( ) . map ( |& x| ( x. to_f64 ( ) * 255.0 ) as u8 ) . collect ( ) ;
997- let mut frame = Frame :: from_indexed_pixels ( width as u16 , height as u16 , frame, Some ( 0 ) ) ;
997+ let mut frame = Frame :: from_indexed_pixels ( width as u16 , height as u16 , frame, None ) ;
998998 frame. delay = ( ( i + 1 ) as f64 * 100.0 / frame_rate) . round ( ) as u16 - t;
999999 t += frame. delay ;
10001000 encoder. write_frame ( & frame) . map_err ( |e| e. to_string ( ) ) ?;
You can’t perform that action at this time.
0 commit comments