diff --git a/kittens/icat/native.go b/kittens/icat/native.go index 1cf9f6605..3e1f98d70 100644 --- a/kittens/icat/native.go +++ b/kittens/icat/native.go @@ -6,6 +6,7 @@ import ( "fmt" "image" "image/gif" + "kitty/tools/tty" "kitty/tools/tui/graphics" "kitty/tools/utils" "kitty/tools/utils/images" @@ -121,19 +122,7 @@ func load_one_frame_image(ctx *images.Context, imgd *image_data, src *opened_inp return } -func calc_min_gap(gaps []int) int { - // Some broken GIF images have all zero gaps, browsers with their usual - // idiot ideas render these with a default 100ms gap https://bugzilla.mozilla.org/show_bug.cgi?id=125137 - // Browsers actually force a 100ms gap at any zero gap frame, but that - // just means it is impossible to deliberately use zero gap frames for - // sophisticated blending, so we dont do that. - max_gap := utils.Max(0, gaps...) - min_gap := 0 - if max_gap <= 0 { - min_gap = 10 - } - return min_gap -} +var debugprintln = tty.DebugPrintln func (frame *image_frame) set_disposal(anchor_frame int, disposal byte) int { anchor_frame, frame.compose_onto = images.SetGIFFrameDisposal(frame.number, anchor_frame, disposal)