Documentation ¶
Index ¶
- Constants
- Variables
- func CalcMinimumGIFGap(gaps []int) int
- func ConvertEntryPoint(root *cli.Command)
- func CreateTemp() (*os.File, error)
- func CreateTempInRAM() (*os.File, error)
- func Encode(output io.Writer, img image.Image, format_mime string) (err error)
- func FitImage(width, height, pwidth, pheight int) (final_width int, final_height int)
- func IsOpaque(img image.Image) bool
- func MakeTempDir(template string) (ans string, err error)
- func RunMagick(path string, cmd []string) ([]byte, error)
- func SetGIFFrameDisposal(number, anchor_frame int, disposal byte) (int, int)
- type Context
- func (self *Context) FlipPixelsH(bytes_per_pixel, width, height int, pix []uint8)
- func (self *Context) FlipPixelsV(bytes_per_pixel, width, height int, pix []uint8)
- func (self *Context) NumberOfThreads() int
- func (self *Context) Parallel(start, stop int, fn func(<-chan int))
- func (self *Context) Paste(background image.Image, img image.Image, pos image.Point, opaque_bg *NRGBColor)
- func (self *Context) PasteCenter(background image.Image, img image.Image, opaque_bg *NRGBColor)
- func (self *Context) SetNumberOfThreads(n int)
- type IdentifyOutput
- type IdentifyRecord
- type ImageData
- type ImageFrame
- type NRGB
- func (p *NRGB) At(x, y int) color.Color
- func (p *NRGB) Bounds() image.Rectangle
- func (p *NRGB) ColorModel() color.Model
- func (p *NRGB) NRGBAt(x, y int) NRGBColor
- func (p *NRGB) Opaque() bool
- func (p *NRGB) PixOffset(x, y int) int
- func (p *NRGB) Set(x, y int, c color.Color)
- func (p *NRGB) SetNRGBA(x, y int, c color.NRGBA)
- func (p *NRGB) SetRGBA64(x, y int, c color.RGBA64)
- func (p *NRGB) SubImage(r image.Rectangle) image.Image
- type NRGBColor
- type RenderOptions
- type Scanner
Constants ¶
View Source
const TempTemplate = "kitty-tty-graphics-protocol-*"
Variables ¶
View Source
var DecodableImageTypes = map[string]bool{ "image/jpeg": true, "image/png": true, "image/bmp": true, "image/tiff": true, "image/webp": true, "image/gif": true, }
View Source
var EncodableImageTypes = map[string]bool{ "image/jpeg": true, "image/png": true, "image/bmp": true, "image/tiff": true, "image/gif": true, }
View Source
var NRGBModel color.Model = color.ModelFunc(nrgbModel)
View Source
var NumberToDiacritic = [297]rune{}/* 297 elements not displayed */
Functions ¶
func CalcMinimumGIFGap ¶
func ConvertEntryPoint ¶
func CreateTemp ¶
func CreateTempInRAM ¶
func MakeTempDir ¶
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func (*Context) FlipPixelsH ¶
func (*Context) FlipPixelsV ¶
func (*Context) NumberOfThreads ¶
func (*Context) Paste ¶
func (self *Context) Paste(background image.Image, img image.Image, pos image.Point, opaque_bg *NRGBColor)
Paste pastes the img image to the background image at the specified position. Optionally composing onto the specified opaque color.
func (*Context) PasteCenter ¶
PasteCenter pastes the img image to the center of the background image. Optionally composing onto the specified opaque color.
func (*Context) SetNumberOfThreads ¶
type IdentifyOutput ¶
type IdentifyOutput struct {
Fmt, Canvas, Transparency, Gap, Index, Size, Dpi, Dispose, Orientation string
}
type IdentifyRecord ¶
type IdentifyRecord struct { Fmt_uppercase string Gap int Canvas struct{ Width, Height, Left, Top int } Width, Height int Dpi struct{ X, Y float64 } Index int Is_opaque bool Needs_blend bool Disposal int Dimensions_swapped bool }
func IdentifyWithMagick ¶
func IdentifyWithMagick(path string) (ans []IdentifyRecord, err error)
type ImageData ¶
type ImageData struct {
Width, Height int
Format_uppercase string
Frames []*ImageFrame
}
func OpenImageFromPath ¶
func OpenNativeImageFromReader ¶
func OpenNativeImageFromReader(f io.ReadSeeker) (ans *ImageData, err error)
type ImageFrame ¶
type ImageFrame struct {
Width, Height, Left, Top int
Number int // 1-based number
Compose_onto int // number of frame to compose onto
Delay_ms int32 // negative for gapless frame, zero ignored, positive is number of ms
Is_opaque bool
Img image.Image
}
func RenderWithMagick ¶
func RenderWithMagick(path string, ro *RenderOptions, frames []IdentifyRecord) (ans []*ImageFrame, fmap map[int]string, err error)
func (*ImageFrame) Data ¶
func (self *ImageFrame) Data() (ans []byte)
func (*ImageFrame) DataAsSHM ¶
func (self *ImageFrame) DataAsSHM(pattern string) (ans shm.MMap, err error)
func (*ImageFrame) Resize ¶
func (self *ImageFrame) Resize(x_frac, y_frac float64) *ImageFrame
type NRGB ¶
type NRGB struct { // Pix holds the image's pixels, in R, G, B, A order. The pixel at // (x, y) starts at Pix[(y-Rect.Min.Y)*Stride + (x-Rect.Min.X)*4]. Pix []uint8 // Stride is the Pix stride (in bytes) between vertically adjacent pixels. Stride int // Rect is the image's bounds. Rect image.Rectangle }
NRGB is an in-memory image whose At method returns NRGBColor values.
func (*NRGB) ColorModel ¶
type RenderOptions ¶
Click to show internal directories.
Click to hide internal directories.