magick

package
v1.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2026 License: MIT Imports: 22 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 { return get_temp_dir() })

Functions

func RunMagick

func RunMagick(i *input, cmd []string) ([]byte, error)

Types

type DisposeOp

type DisposeOp int
const (
	DisposeNone DisposeOp = iota
	DisposeBackground
	DisposePrevious
)

type IdentifyOutput

type IdentifyOutput struct {
	Fmt, Canvas, Transparency, Gap, Index, Size, Dpi, Dispose, Orientation, Colorspace 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           DisposeOp
	Dimensions_swapped bool
	ColorSpace         string
}

type Image

type Image struct {
	Frames           []*ImageFrame
	Format_uppercase string
}

func OpenAll

func OpenAll(input *types.Input, md *meta.Data, callback func(w, h int) RenderOptions) (ans *Image, 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
	Replace                  bool  // do a replace rather than an alpha blend
	Is_opaque                bool
	Img                      image.Image
}

type RenderOptions

type RenderOptions struct {
	Background             *color.RGBA64
	ResizeTo               image.Point
	OnlyFirstFrame         bool
	AutoOrient             bool
	ToSRGB                 bool
	Transform              types.TransformType
	RenderingIntent        icc.RenderingIntent
	BlackpointCompensation bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL