mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-27 03:42:49 +00:00
Code to convert images to NRGB
This commit is contained in:
parent
143fd6e4dd
commit
d192dcb0d7
2 changed files with 259 additions and 3 deletions
|
|
@ -5,7 +5,6 @@ package icat
|
|||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"image/color"
|
||||
"os"
|
||||
"runtime"
|
||||
"strconv"
|
||||
|
|
@ -19,6 +18,7 @@ import (
|
|||
"kitty/tools/tui/graphics"
|
||||
"kitty/tools/tui/loop"
|
||||
"kitty/tools/utils"
|
||||
"kitty/tools/utils/images"
|
||||
"kitty/tools/utils/shm"
|
||||
"kitty/tools/utils/style"
|
||||
)
|
||||
|
|
@ -33,7 +33,7 @@ var opts *Options
|
|||
var lp *loop.Loop
|
||||
var place *Place
|
||||
var z_index int32
|
||||
var remove_alpha *color.NRGBA
|
||||
var remove_alpha *images.NRGBColor
|
||||
var flip, flop bool
|
||||
|
||||
type transfer_mode int
|
||||
|
|
@ -72,7 +72,7 @@ func parse_background() (err error) {
|
|||
if err != nil {
|
||||
return fmt.Errorf("Invalid value for --background: %w", err)
|
||||
}
|
||||
remove_alpha = &color.NRGBA{col.Red, col.Green, col.Blue, 255}
|
||||
remove_alpha = &images.NRGBColor{col.Red, col.Green, col.Blue}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue