Files
FWS-Kitty/tools/utils/images/to_rgb.go
T
BlackAngelTV 3d174c45a4 chore: import official kitty sources from upstream
Bring the kovidgoyal/kitty codebase in as the base of FWS-Kitty, vendored at upstream commit 91fb38a without its git history.
2026-11-04 11:35:59 +01:00

24 lines
504 B
Go

// License: GPLv3 Copyright: 2023, Kovid Goyal, <kovid at kovidgoyal.net>
package images
import (
"fmt"
"image"
"github.com/kovidgoyal/imaging"
"github.com/kovidgoyal/imaging/nrgb"
)
var _ = fmt.Print
func (self *Context) paste_nrgb_onto_opaque(background *imaging.NRGB, img image.Image, pos image.Point, bgcol *imaging.NRGBColor) {
bg := imaging.NRGBColor{}
if bgcol != nil {
bg = *bgcol
}
src := nrgb.NewNRGBScanner(img, bg)
self.run_paste(src, background, pos, func(dst []byte) {})
}