Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var HasMagick = sync.OnceValue(func() bool { return MagickExe() != "magick" })
View Source
var MagickExe = sync.OnceValue(func() string { ans, err := exec.LookPath("magick") if err != nil || ans == "" { ans = "magick" } return ans })
View Source
var TempDirInRAMIfPossible = sync.OnceValue(func() string { const shm = "/dev/shm" if s, err := os.Stat(shm); err == nil && s.IsDir() { tempFile, err := os.CreateTemp(shm, "write_check_*") if err != nil { return os.TempDir() } tempFile.Close() os.Remove(tempFile.Name()) return shm } return os.TempDir() })
Functions ¶
Types ¶
type IdentifyOutput ¶
type IdentifyOutput struct {
Fmt, Canvas, Transparency, Gap, Index, Size, Dpi, Dispose, Orientation, Colorspace string
}
type IdentifyRecord ¶
type Image ¶
type Image struct {
Frames []*ImageFrame
Format_uppercase string
}
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
Replace bool // do a replace rather than an alpha blend
Is_opaque bool
Img image.Image
}
type RenderOptions ¶
Click to show internal directories.
Click to hide internal directories.