imagick

package
Version: v3.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2018 License: BSD-3-Clause Imports: 11 Imported by: 8

Documentation

Index

Constants

View Source
const (
	NOVALUE  = C.NoValue  // = 0x0000
	XVALUE   = C.XValue   ////= 0x0001
	XIVALUE  = C.XiValue  //= 0x0001
	YVALUE   = C.YValue   //= 0x0002
	PSIVALUE = C.PsiValue //= 0x0002

	WIDTHVALUE = C.WidthValue //= 0x0004
	RHOVALUE   = C.RhoValue   //= 0x0004

	HEIGHTVALUE = C.HeightValue //= 0x0008
	SIGMAVALUE  = C.SigmaValue  //= 0x0008
	CHIVALUE    = C.ChiValue    //= 0x0010
	XINEGATIVE  = C.XiNegative  //= 0x0020

	XNEGATIVE               = C.XNegative               //= 0x0020
	PSINEGATIVE             = C.PsiNegative             //= 0x0040
	YNEGATIVE               = C.YNegative               //= 0x0040
	CHINEGATIVE             = C.ChiNegative             //= 0x0080
	PERCENTVALUE            = C.PercentValue            //= 0x1000   /* '%'  percentage of something */
	ASPECTVALUE             = C.AspectValue             //= 0x2000    /* '!'  resize no-aspect - special use flag */
	NORMALIZEVALUE          = C.NormalizeValue          //= 0x2000 /* '!'  ScaleKernelValue() in morphology.c */
	LESSVALUE               = C.LessValue               //= 0x4000      /* '<'  resize smaller - special use flag */
	GREATERVALUE            = C.GreaterValue            //= 0x8000   /* '>'  resize larger - spacial use flag */
	MINIMUMVALUE            = C.MinimumValue            //= 0x10000  /* '^'  special handling needed */
	CORRELATENORMALIZEVALUE = C.CorrelateNormalizeValue //= 0x10000 /* '^' see ScaleKernelValue() */
	AREAVALUE               = C.AreaValue               //= 0x20000     /* '@'  resize to area - special use flag */
	DECIMALVALUE            = C.DecimalValue            //= 0x40000  /* '.'  floating point numbers found */
	SEPARATORVALUE          = C.SeparatorValue          //= 0x80000  /* 'x'  separator found  */

	ALLVALUES = C.AllValues //= 0x7fffffff
)

Variables

This section is empty.

Functions

func ConvertHSLToRGB

func ConvertHSLToRGB(fh, fs, fl float64) (r, g, b float64)

func ConvertRGBToHSL

func ConvertRGBToHSL(qr, qg, qb float64) (h, s, l float64)

func CoreInitialize

func CoreInitialize(path string)

func CoreTerminate

func CoreTerminate()

func Destroy added in v1.1.0

func Destroy(d types.Destroyer)

Destroy instance of Destroyer If GOGC=off you should call obj.Destroy() manually

func GetCopyright

func GetCopyright() string

Returns the ImageMagick API copyright as a string constant.

func GetHomeURL

func GetHomeURL() string

Returns the ImageMagick home URL.

func GetPackageName

func GetPackageName() string

Returns the ImageMagick package name as a string constant.

func GetPrecision

func GetPrecision() int

func GetQuantumDepth

func GetQuantumDepth() (string, uint)

Returns the ImageMagick quantum depth as a string constant.

func GetQuantumRange

func GetQuantumRange() (string, uint)

Returns the ImageMagick quantum range as a string constant.

func GetReleaseDate

func GetReleaseDate() string

Returns the ImageMagick release date as a string constant.

func GetResource

func GetResource(rtype ResourceType) int64

Returns the specified resource in megabytes.

func GetResourceLimit

func GetResourceLimit(rtype ResourceType) int64

Returns the specified resource limit in megabytes.

func GetVersion

func GetVersion() (version string, nversion uint)

Returns the ImageMagick API version as a string constant and as a number.

func Initialize

func Initialize()

Initializes the MagickWand environment

func IsCoreInstantiated

func IsCoreInstantiated() bool

func NewMagickImage

func NewMagickImage(info *ImageInfo, width, height uint,
	background *PixelInfo) (*Image, *ExceptionInfo)

func SetPrecision

func SetPrecision(precision int)

func Terminate

func Terminate()

Terminates the MagickWand environment wait until all imageMagick objects destroyed

Types

type AffineMatrix

type AffineMatrix struct {
	// contains filtered or unexported fields
}

AffineMatrix represents an ImageMagick AffineMatrix struct

func NewAffineMatrix

func NewAffineMatrix() *AffineMatrix

NewAffineMatrix constructs an AffineMatrix that is initialized to the indentify matrix

func (*AffineMatrix) ResetToIdentity

func (a *AffineMatrix) ResetToIdentity()

ResetToIdentity resets the AffineMatrix to the identity matrix

func (*AffineMatrix) RotateX

func (a *AffineMatrix) RotateX() float64

RotateX returns the RX value

func (*AffineMatrix) RotateY

func (a *AffineMatrix) RotateY() float64

RotateY returns the RY value

func (*AffineMatrix) ScaleX

func (a *AffineMatrix) ScaleX() float64

ScaleX returns the SX value

func (*AffineMatrix) ScaleY

func (a *AffineMatrix) ScaleY() float64

ScaleY returns the SY value

func (*AffineMatrix) SetRotateX

func (a *AffineMatrix) SetRotateX(val float64)

SetRotateX sets the RX value

func (*AffineMatrix) SetRotateY

func (a *AffineMatrix) SetRotateY(val float64)

SetRotateY sets the RY value

func (*AffineMatrix) SetScaleX

func (a *AffineMatrix) SetScaleX(val float64)

SetScaleX sets the SX value

func (*AffineMatrix) SetScaleY

func (a *AffineMatrix) SetScaleY(val float64)

SetScaleY sets the SY value

func (*AffineMatrix) SetTranslateX

func (a *AffineMatrix) SetTranslateX(val float64)

SetTranslateX sets the TX value

func (*AffineMatrix) SetTranslateY

func (a *AffineMatrix) SetTranslateY(val float64)

SetTranslateY sets the TY value

func (*AffineMatrix) TranslateX

func (a *AffineMatrix) TranslateX() float64

TranslateX returns the TX value

func (*AffineMatrix) TranslateY

func (a *AffineMatrix) TranslateY() float64

TranslateY returns the TY value

type AlignType

type AlignType int
const (
	ALIGN_UNDEFINED AlignType = C.UndefinedAlign
	ALIGN_LEFT      AlignType = C.LeftAlign
	ALIGN_CENTER    AlignType = C.CenterAlign
	ALIGN_RIGHT     AlignType = C.RightAlign
)

type AlphaChannelType

type AlphaChannelType int
const (
	ALPHA_CHANNEL_UNDEFINED    AlphaChannelType = C.UndefinedAlphaChannel
	ALPHA_CHANNEL_ACTIVATE     AlphaChannelType = C.ActivateAlphaChannel
	ALPHA_CHANNEL_ASSOCIATE    AlphaChannelType = C.AssociateAlphaChannel
	ALPHA_CHANNEL_BACKGROUND   AlphaChannelType = C.BackgroundAlphaChannel
	ALPHA_CHANNEL_COPY         AlphaChannelType = C.CopyAlphaChannel
	ALPHA_CHANNEL_DEACTIVATE   AlphaChannelType = C.DeactivateAlphaChannel
	ALPHA_CHANNEL_DISASSOCIATE AlphaChannelType = C.DisassociateAlphaChannel
	ALPHA_CHANNEL_DISCRETE     AlphaChannelType = C.DiscreteAlphaChannel
	ALPHA_CHANNEL_EXTRACT      AlphaChannelType = C.ExtractAlphaChannel
	ALPHA_CHANNEL_OFF          AlphaChannelType = C.OffAlphaChannel
	ALPHA_CHANNEL_ON           AlphaChannelType = C.OnAlphaChannel
	ALPHA_CHANNEL_OPAQUE       AlphaChannelType = C.OpaqueAlphaChannel
	ALPHA_CHANNEL_REMOVE       AlphaChannelType = C.RemoveAlphaChannel
	ALPHA_CHANNEL_SET          AlphaChannelType = C.SetAlphaChannel
	ALPHA_CHANNEL_SHAPE        AlphaChannelType = C.ShapeAlphaChannel
	ALPHA_CHANNEL_TRANSPARENT  AlphaChannelType = C.TransparentAlphaChannel
)

type ChannelFeatures

type ChannelFeatures struct {
	// contains filtered or unexported fields
}

type ChannelStatistics

type ChannelStatistics struct {
	// contains filtered or unexported fields
}

type ChannelType

type ChannelType int
const (
	CHANNEL_UNDEFINED  ChannelType = C.UndefinedChannel
	CHANNEL_RED        ChannelType = C.RedChannel
	CHANNEL_GRAY       ChannelType = C.GrayChannel
	CHANNEL_CYAN       ChannelType = C.CyanChannel
	CHANNEL_GREEN      ChannelType = C.GreenChannel
	CHANNEL_MAGENTA    ChannelType = C.MagentaChannel
	CHANNEL_BLUE       ChannelType = C.BlueChannel
	CHANNEL_YELLOW     ChannelType = C.YellowChannel
	CHANNEL_ALPHA      ChannelType = C.AlphaChannel
	CHANNEL_OPACITY    ChannelType = C.OpacityChannel
	CHANNEL_BLACK      ChannelType = C.BlackChannel
	CHANNEL_INDEX      ChannelType = C.IndexChannel
	CHANNEL_TRUE_ALPHA ChannelType = C.TrueAlphaChannel
	CHANNELS_COMPOSITE ChannelType = C.CompositeChannels
	CHANNELS_ALL       ChannelType = C.AllChannels
	CHANNELS_RGB       ChannelType = C.RGBChannels
	CHANNELS_GRAY      ChannelType = C.GrayChannels
	CHANNELS_SYNC      ChannelType = C.SyncChannels
	CHANNELS_DEFAULT   ChannelType = C.DefaultChannels
)

type ClipPathUnits

type ClipPathUnits int
const (
	CLIP_UNDEFINED_PATH      ClipPathUnits = C.UndefinedPathUnits
	CLIP_USER_SPACE          ClipPathUnits = C.UserSpace
	CLIP_USER_SPACE_ON_USE   ClipPathUnits = C.UserSpaceOnUse
	CLIP_OBJECT_BOUNDING_BOX ClipPathUnits = C.ObjectBoundingBox
)

type ColorspaceType

type ColorspaceType int
const (
	COLORSPACE_UNDEFINED   ColorspaceType = C.UndefinedColorspace
	COLORSPACE_CMY         ColorspaceType = C.CMYColorspace
	COLORSPACE_CMYK        ColorspaceType = C.CMYKColorspace
	COLORSPACE_GRAY        ColorspaceType = C.GRAYColorspace
	COLORSPACE_HCL         ColorspaceType = C.HCLColorspace
	COLORSPACE_HCLP        ColorspaceType = C.HCLpColorspace
	COLORSPACE_HSB         ColorspaceType = C.HSBColorspace
	COLORSPACE_HSI         ColorspaceType = C.HSIColorspace
	COLORSPACE_HSL         ColorspaceType = C.HSLColorspace
	COLORSPACE_HSV         ColorspaceType = C.HSVColorspace
	COLORSPACE_HWB         ColorspaceType = C.HWBColorspace
	COLORSPACE_LAB         ColorspaceType = C.LabColorspace
	COLORSPACE_LCH         ColorspaceType = C.LCHColorspace
	COLORSPACE_LCHAB       ColorspaceType = C.LCHabColorspace
	COLORSPACE_LCHUV       ColorspaceType = C.LCHuvColorspace
	COLORSPACE_LMS         ColorspaceType = C.LMSColorspace
	COLORSPACE_LOG         ColorspaceType = C.LogColorspace
	COLORSPACE_LUV         ColorspaceType = C.LuvColorspace
	COLORSPACE_OHTA        ColorspaceType = C.OHTAColorspace
	COLORSPACE_REC601YCBCR ColorspaceType = C.Rec601YCbCrColorspace
	COLORSPACE_REC709YCBCR ColorspaceType = C.Rec709YCbCrColorspace
	COLORSPACE_RGB         ColorspaceType = C.RGBColorspace
	COLORSPACE_SCRGB       ColorspaceType = C.scRGBColorspace
	COLORSPACE_SRGB        ColorspaceType = C.sRGBColorspace
	COLORSPACE_TRANSPARENT ColorspaceType = C.TransparentColorspace
	COLORSPACE_XYY         ColorspaceType = C.xyYColorspace
	COLORSPACE_XYZ         ColorspaceType = C.XYZColorspace
	COLORSPACE_YCBCR       ColorspaceType = C.YCbCrColorspace
	COLORSPACE_YCC         ColorspaceType = C.YCCColorspace
	COLORSPACE_YDDDR       ColorspaceType = C.YDbDrColorspace
	COLORSPACE_YIQ         ColorspaceType = C.YIQColorspace
	COLORSPACE_YPBPR       ColorspaceType = C.YPbPrColorspace
	COLORSPACE_YUV         ColorspaceType = C.YUVColorspace
)

type CompositeOperator

type CompositeOperator int
const (
	COMPOSITE_OP_UNDEFINED         CompositeOperator = C.UndefinedCompositeOp
	COMPOSITE_OP_ALPHA             CompositeOperator = C.AlphaCompositeOp
	COMPOSITE_OP_ATOP              CompositeOperator = C.AtopCompositeOp
	COMPOSITE_OP_BLEND             CompositeOperator = C.BlendCompositeOp
	COMPOSITE_OP_BLUR              CompositeOperator = C.BlurCompositeOp
	COMPOSITE_OP_BUMPMAP           CompositeOperator = C.BumpmapCompositeOp
	COMPOSITE_OP_CHANGE_MASK       CompositeOperator = C.ChangeMaskCompositeOp
	COMPOSITE_OP_CLEAR             CompositeOperator = C.ClearCompositeOp
	COMPOSITE_OP_COLOR_BURN        CompositeOperator = C.ColorBurnCompositeOp
	COMPOSITE_OP_COLOR_DODGE       CompositeOperator = C.ColorDodgeCompositeOp
	COMPOSITE_OP_COLORIZE          CompositeOperator = C.ColorizeCompositeOp
	COMPOSITE_OP_COPY              CompositeOperator = C.CopyCompositeOp
	COMPOSITE_OP_COPY_ALPHA        CompositeOperator = C.CopyAlphaCompositeOp
	COMPOSITE_OP_COPY_BLACK        CompositeOperator = C.CopyBlackCompositeOp
	COMPOSITE_OP_COPY_BLUE         CompositeOperator = C.CopyBlueCompositeOp
	COMPOSITE_OP_COPY_CYAN         CompositeOperator = C.CopyCyanCompositeOp
	COMPOSITE_OP_COPY_GREEN        CompositeOperator = C.CopyGreenCompositeOp
	COMPOSITE_OP_COPY_MAGENTA      CompositeOperator = C.CopyMagentaCompositeOp
	COMPOSITE_OP_COPY_RED          CompositeOperator = C.CopyRedCompositeOp
	COMPOSITE_OP_COPY_YELLOW       CompositeOperator = C.CopyYellowCompositeOp
	COMPOSITE_OP_DARKEN            CompositeOperator = C.DarkenCompositeOp
	COMPOSITE_OP_DARKEN_INTENSITY  CompositeOperator = C.DarkenIntensityCompositeOp
	COMPOSITE_OP_DIFFERENCE        CompositeOperator = C.DifferenceCompositeOp
	COMPOSITE_OP_DISPLACE          CompositeOperator = C.DisplaceCompositeOp
	COMPOSITE_OP_DISSOLVE          CompositeOperator = C.DissolveCompositeOp
	COMPOSITE_OP_DISTORT           CompositeOperator = C.DistortCompositeOp
	COMPOSITE_OP_DIVIDE__DST       CompositeOperator = C.DivideDstCompositeOp
	COMPOSITE_OP_DIVIDE_SRC        CompositeOperator = C.DivideSrcCompositeOp
	COMPOSITE_OP_DST               CompositeOperator = C.DstCompositeOp
	COMPOSITE_OP_DST_ATOP          CompositeOperator = C.DstAtopCompositeOp
	COMPOSITE_OP_DST_IN            CompositeOperator = C.DstInCompositeOp
	COMPOSITE_OP_DST_OUT           CompositeOperator = C.DstOutCompositeOp
	COMPOSITE_OP_DST_OVER          CompositeOperator = C.DstOverCompositeOp
	COMPOSITE_OP_EXCLUSION         CompositeOperator = C.ExclusionCompositeOp
	COMPOSITE_OP_HARD_LIGHT        CompositeOperator = C.HardLightCompositeOp
	COMPOSITE_OP_HARD_MIX          CompositeOperator = C.HardMixCompositeOp
	COMPOSITE_OP_HUE               CompositeOperator = C.HueCompositeOp
	COMPOSITE_OP_IN                CompositeOperator = C.InCompositeOp
	COMPOSITE_OP_INTENSITY         CompositeOperator = C.IntensityCompositeOp
	COMPOSITE_OP_LIGHTEN           CompositeOperator = C.LightenCompositeOp
	COMPOSITE_OP_LIGHTEN_INTENSITY CompositeOperator = C.LightenIntensityCompositeOp
	COMPOSITE_OP_LINEAR_BURN       CompositeOperator = C.LinearBurnCompositeOp
	COMPOSITE_OP_LINEAR_DODGE      CompositeOperator = C.LinearDodgeCompositeOp
	COMPOSITE_OP_LINEAR_LIGHT      CompositeOperator = C.LinearLightCompositeOp
	COMPOSITE_OP_LUMINIZE          CompositeOperator = C.LuminizeCompositeOp
	COMPOSITE_OP_MATHEMATICS       CompositeOperator = C.MathematicsCompositeOp
	COMPOSITE_OP_MINUS_DST         CompositeOperator = C.MinusDstCompositeOp
	COMPOSITE_OP_MINUS_SRC         CompositeOperator = C.MinusSrcCompositeOp
	COMPOSITE_OP_MODULATE          CompositeOperator = C.ModulateCompositeOp
	COMPOSITE_OP_MODULUS_ADD       CompositeOperator = C.ModulusAddCompositeOp
	COMPOSITE_OP_MODULUS_SUBTRACT  CompositeOperator = C.ModulusSubtractCompositeOp
	COMPOSITE_OP_MULTIPLY          CompositeOperator = C.MultiplyCompositeOp
	COMPOSITE_OP_NO                CompositeOperator = C.NoCompositeOp
	COMPOSITE_OP_OUT               CompositeOperator = C.OutCompositeOp
	COMPOSITE_OP_OVER              CompositeOperator = C.OverCompositeOp
	COMPOSITE_OP_OVERLAY           CompositeOperator = C.OverlayCompositeOp
	COMPOSITE_OP_PEGTOP_LIGHT      CompositeOperator = C.PegtopLightCompositeOp
	COMPOSITE_OP_PIN_LIGHT         CompositeOperator = C.PinLightCompositeOp
	COMPOSITE_OP_PLUS              CompositeOperator = C.PlusCompositeOp
	COMPOSITE_OP_REPLACE           CompositeOperator = C.ReplaceCompositeOp
	COMPOSITE_OP_SATURATE          CompositeOperator = C.SaturateCompositeOp
	COMPOSITE_OP_SCREEN            CompositeOperator = C.ScreenCompositeOp
	COMPOSITE_OP_SOFT_LIGHT        CompositeOperator = C.SoftLightCompositeOp
	COMPOSITE_OP_SRC               CompositeOperator = C.SrcCompositeOp
	COMPOSITE_OP_SRC_ATOP          CompositeOperator = C.SrcAtopCompositeOp
	COMPOSITE_OP_SRC_IN            CompositeOperator = C.SrcInCompositeOp
	COMPOSITE_OP_SRC_OUT           CompositeOperator = C.SrcOutCompositeOp
	COMPOSITE_OP_SRC_OVER          CompositeOperator = C.SrcOverCompositeOp
	COMPOSITE_OP_THRESHOLD         CompositeOperator = C.ThresholdCompositeOp
	COMPOSITE_OP_VIVID_LIGHT       CompositeOperator = C.VividLightCompositeOp
	COMPOSITE_OP_XOR               CompositeOperator = C.XorCompositeOp
)

type CompressionType

type CompressionType int
const (
	COMPRESSION_UNDEFINED     CompressionType = C.UndefinedCompression
	COMPRESSION_NO            CompressionType = C.NoCompression
	COMPRESSION_BZIP          CompressionType = C.BZipCompression
	COMPRESSION_DXT1          CompressionType = C.DXT1Compression
	COMPRESSION_DXT3          CompressionType = C.DXT3Compression
	COMPRESSION_DXT5          CompressionType = C.DXT5Compression
	COMPRESSION_FAX           CompressionType = C.FaxCompression
	COMPRESSION_GROUP4        CompressionType = C.Group4Compression
	COMPRESSION_JPEG          CompressionType = C.JPEGCompression
	COMPRESSION_JPEG2000      CompressionType = C.JPEG2000Compression
	COMPRESSION_LOSSLESS_JPEG CompressionType = C.LosslessJPEGCompression
	COMPRESSION_LZW           CompressionType = C.LZWCompression
	COMPRESSION_RLE           CompressionType = C.RLECompression
	COMPRESSION_ZIP           CompressionType = C.ZipCompression
	COMPRESSION_ZIPS          CompressionType = C.ZipSCompression
	COMPRESSION_PIZ           CompressionType = C.PizCompression
	COMPRESSION_PXR24         CompressionType = C.Pxr24Compression
	COMPRESSION_B44           CompressionType = C.B44Compression
	COMPRESSION_B44A          CompressionType = C.B44ACompression
	COMPRESSION_LZMA          CompressionType = C.LZMACompression
	COMPRESSION_JBIG1         CompressionType = C.JBIG1Compression
	COMPRESSION_JBIG2         CompressionType = C.JBIG2Compression
)

type DecorationType

type DecorationType int
const (
	DECORATION_UNDEFINED    DecorationType = C.UndefinedDecoration
	DECORATION_NONE         DecorationType = C.NoDecoration
	DECORATION_UNDERLINE    DecorationType = C.UnderlineDecoration
	DECORATION_OVERLINE     DecorationType = C.OverlineDecoration
	DECORATION_LINE_THROUGH DecorationType = C.LineThroughDecoration
)

type DisposeType

type DisposeType int
const (
	DISPOSE_UNRECOGNIZED DisposeType = C.UnrecognizedDispose
	DISPOSE_UNDEFINED    DisposeType = C.UndefinedDispose
	DISPOSE_NONE         DisposeType = C.NoneDispose
	DISPOSE_BACKGROUND   DisposeType = C.BackgroundDispose
	DISPOSE_PREVIOUS     DisposeType = C.PreviousDispose
)

type DistortImageMethod

type DistortImageMethod int
const (
	DISTORTION_UNDEFINED              DistortImageMethod = C.UndefinedDistortion
	DISTORTION_AFFINE                 DistortImageMethod = C.AffineDistortion
	DISTORTION_AFFINE_PROJECTION      DistortImageMethod = C.AffineProjectionDistortion
	DISTORTION_ARC                    DistortImageMethod = C.ArcDistortion
	DISTORTION_BARREL                 DistortImageMethod = C.BarrelDistortion
	DISTORTION_BARREL_INVERSE         DistortImageMethod = C.BarrelInverseDistortion
	DISTORTION_BILINEAR               DistortImageMethod = C.BilinearDistortion
	DISTORTION_BILINEAR_FORWARD       DistortImageMethod = C.BilinearForwardDistortion
	DISTORTION_BILINEAR_REVERSE       DistortImageMethod = C.BilinearReverseDistortion
	DISTORTION_CYLINDER_2_PLANE       DistortImageMethod = C.Cylinder2PlaneDistortion
	DISTORTION_DE_POLAR               DistortImageMethod = C.DePolarDistortion
	DISTORTION_PERSPECTIVE            DistortImageMethod = C.PerspectiveDistortion
	DISTORTION_PERSPECTIVE_PROJECTION DistortImageMethod = C.PerspectiveProjectionDistortion
	DISTORTION_PLANE_2_CYLINDER       DistortImageMethod = C.Plane2CylinderDistortion
	DISTORTION_POLAR                  DistortImageMethod = C.PolarDistortion
	DISTORTION_POLYNOMIAL             DistortImageMethod = C.PolynomialDistortion
	DISTORTION_RESIZE                 DistortImageMethod = C.ResizeDistortion
	DISTORTION_SCALE_ROTATE_TRANSLATE DistortImageMethod = C.ScaleRotateTranslateDistortion
	DISTORTION_SENTINEL               DistortImageMethod = C.SentinelDistortion
	DISTORTION_SHEPARDS               DistortImageMethod = C.ShepardsDistortion
)

type DitherMethod

type DitherMethod int
const (
	DITHER_METHOD_UNDEFINED       DitherMethod = C.UndefinedDitherMethod
	DITHER_METHOD_NO              DitherMethod = C.NoDitherMethod
	DITHER_METHOD_RIEMERSMA       DitherMethod = C.RiemersmaDitherMethod
	DITHER_METHOD_FLOYD_STEINBERG DitherMethod = C.FloydSteinbergDitherMethod
)

type DrawInfo

type DrawInfo struct {
	// contains filtered or unexported fields
}

func NewDrawInfo

func NewDrawInfo() *DrawInfo

type DrawingWand

type DrawingWand struct {
	// contains filtered or unexported fields
}

func NewDrawingWand

func NewDrawingWand() *DrawingWand

Returns a drawing wand required for all other methods in the API.

func (*DrawingWand) Affine

func (dw *DrawingWand) Affine(affine *AffineMatrix)

Adjusts the current affine transformation matrix with the specified affine transformation matrix. Note that the current affine transform is adjusted rather than replaced.

affine: Affine matrix parameters

func (*DrawingWand) Alpha

func (dw *DrawingWand) Alpha(x, y float64, pmethod PaintMethod)

Paints on the image's opacity channel in order to set effected pixels to transparent. to influence the opacity of pixels. The available paint methods are:

	ResetMethod: Select all pixels.

	PointMethod: Select the target pixel

	ReplaceMethod: Select any pixel that matches the target pixel.

	FloodfillMethod: Select the target pixel and matching neighbors.

	FillToBorderMethod: Select the target pixel and neighbors not matching
                     border color.

x, y: x, y ordinates pmethod: paint method

func (*DrawingWand) Annotation

func (dw *DrawingWand) Annotation(x, y float64, text string)

Draws text on the image. x: x ordinate to left of text y: y ordinate to text baseline text: text to draw

func (*DrawingWand) Arc

func (dw *DrawingWand) Arc(sx, sy, ex, ey, sd, ed float64)

Draws an arc falling within a specified bounding rectangle on the image.

sx: starting x ordinate of bounding rectangle

sy: starting y ordinate of bounding rectangle

ex: ending x ordinate of bounding rectangle

ey: ending y ordinate of bounding rectangle

sd: starting degrees of rotation

ed: ending degrees of rotation

func (*DrawingWand) Bezier

func (dw *DrawingWand) Bezier(coordinates []PointInfo)

Draws a bezier curve through a set of points on the image.

func (*DrawingWand) Circle

func (dw *DrawingWand) Circle(ox, oy, px, py float64)

Draws a circle on the image.

ox: origin x ordinate

oy: origin y ordinate

px: perimeter x ordinate

py: perimeter y ordinate

func (*DrawingWand) Clear

func (dw *DrawingWand) Clear()

Clears resources associated with the drawing wand.

func (*DrawingWand) Clone

func (dw *DrawingWand) Clone() *DrawingWand

Makes an exact copy of the specified wand.

func (*DrawingWand) Color

func (dw *DrawingWand) Color(x, y float64, pm PaintMethod)

Draws color on image using the current fill color, starting at specified position, and using specified paint method. The available paint methods are:

x: x ordinate.

y: y ordinate.

pm: paint method. PointMethod: Recolors the target pixel. ReplaceMethod: Recolor any pixel that matches the target pixel. FloodfillMethod: Recolors target pixels and matching neighbors. ResetMethod: Recolor all pixels.

func (*DrawingWand) Comment

func (dw *DrawingWand) Comment(comment string)

Adds a comment to a vector output stream.

func (*DrawingWand) Composite

func (dw *DrawingWand) Composite(compose CompositeOperator, x, y, width, height float64, mw *MagickWand) error

Composites an image onto the current image, using the specified composition operator, specified position, and at the specified size.

compose: composition operator

x: x ordinate of top left corner

y: y ordinate of top left corner

width: Width to resize image to prior to compositing. Specify zero to use existing width.

height: Height to resize image to prior to compositing. Specify zero to use existing height.

mw: Image to composite is obtained from this wand.

func (*DrawingWand) DecreaseCount added in v1.1.0

func (dw *DrawingWand) DecreaseCount()

Decrease DrawingWand ref counter and set according "can be terminated status"

func (*DrawingWand) Destroy

func (dw *DrawingWand) Destroy()

Frees all resources associated with the drawing wand. Once the drawing wand has been freed, it should not be used and further unless it re-allocated.

func (*DrawingWand) Ellipse

func (dw *DrawingWand) Ellipse(ox, oy, rx, ry, start, end float64)

Draws an ellipse on the image.

ox: origin x ordinate

oy: origin y ordinate

rx: radius in x

ry: radius in y

start: starting rotation in degrees

end: ending rotation in degrees

func (*DrawingWand) GetBorderColor

func (dw *DrawingWand) GetBorderColor() (pw *PixelWand)

Returns the border color used for drawing bordered objects.

func (*DrawingWand) GetClipPath

func (dw *DrawingWand) GetClipPath() string

Obtains the current clipping path ID.

func (*DrawingWand) GetClipRule

func (dw *DrawingWand) GetClipRule() FillRule

Returns the current polygon fill rule to be used by the clipping path.

func (*DrawingWand) GetClipUnits

func (dw *DrawingWand) GetClipUnits() ClipPathUnits

Returns the interpretation of clip path units.

func (*DrawingWand) GetFillColor

func (dw *DrawingWand) GetFillColor() (pw *PixelWand)

Returns the fill color used for drawing filled objects.

func (*DrawingWand) GetFillOpacity

func (dw *DrawingWand) GetFillOpacity() float64

Returns the opacity used when drawing using the fill color or fill texture. Fully opaque is 1.0.

func (*DrawingWand) GetFillRule

func (dw *DrawingWand) GetFillRule() FillRule

Returns the fill rule used while drawing polygons.

func (*DrawingWand) GetFont

func (dw *DrawingWand) GetFont() string

Returns a string specifying the font used when annotating with text.

func (*DrawingWand) GetFontFamily

func (dw *DrawingWand) GetFontFamily() string

Returns the font family to use when annotating with text.

func (*DrawingWand) GetFontResolution

func (dw *DrawingWand) GetFontResolution() (x, y float64, err error)

Gets the image X and Y resolution.

func (*DrawingWand) GetFontStretch

func (dw *DrawingWand) GetFontStretch() StretchType

Returns the font stretch used when annotating with text.

func (*DrawingWand) GetFontStyle

func (dw *DrawingWand) GetFontStyle() StyleType

Returns the font style used when annotating with text.

func (*DrawingWand) GetFontWeight

func (dw *DrawingWand) GetFontWeight() uint

Returns the font weight used when annotating with text.

func (*DrawingWand) GetGravity

func (dw *DrawingWand) GetGravity() GravityType

Returns the text placement gravity used when annotating with text.

func (*DrawingWand) GetLastError

func (dw *DrawingWand) GetLastError() error

Returns the kind, reason and description of any error that occurs when using other methods in this API

func (*DrawingWand) GetOpacity

func (dw *DrawingWand) GetOpacity() float64

Returns the opacity used when drawing with the fill or stroke color or texture. Fully opaque is 1.0.

func (*DrawingWand) GetStrokeAntialias

func (dw *DrawingWand) GetStrokeAntialias() bool

Returns the current stroke antialias setting. Stroked outlines are antialiased by default. When antialiasing is disabled stroked pixels are thresholded to determine if the stroke color or underlying canvas color should be used.

func (*DrawingWand) GetStrokeColor

func (dw *DrawingWand) GetStrokeColor() (pw *PixelWand)

Returns the color used for stroking object outlines.

func (*DrawingWand) GetStrokeDashArray

func (dw *DrawingWand) GetStrokeDashArray() (nums []float64)

Returns an array representing the pattern of dashes and gaps used to stroke paths (see SetStrokeDashArray). The array must be freed once it is no longer required by the user.

func (*DrawingWand) GetStrokeDashOffset

func (dw *DrawingWand) GetStrokeDashOffset() float64

Returns the offset into the dash pattern to start the dash.

func (*DrawingWand) GetStrokeLineCap

func (dw *DrawingWand) GetStrokeLineCap() LineCap

Returns the shape to be used at the end of open subpaths when they are stroked. Values of LineCap are UndefinedCap, ButtCap, RoundCap, and SquareCap.

func (*DrawingWand) GetStrokeLineJoin

func (dw *DrawingWand) GetStrokeLineJoin() LineJoin

Returns the shape to be used at the corners of paths (or other vector shapes) when they are stroked. Values of LineJoin are UndefinedJoin, MiterJoin, RoundJoin, and BevelJoin.

func (*DrawingWand) GetStrokeMiterLimit

func (dw *DrawingWand) GetStrokeMiterLimit() uint

Returns the miter limit. When two line segments meet at a sharp angle and miter joins have been specified for 'lineJoin', it is possible for the miter to extend far beyond the thickness of the line stroking the path. The miterLimit' imposes a limit on the ratio of the miter length to the 'lineWidth'.

func (*DrawingWand) GetStrokeOpacity

func (dw *DrawingWand) GetStrokeOpacity() float64

Returns the opacity of stroked object outlines.

func (*DrawingWand) GetStrokeWidth

func (dw *DrawingWand) GetStrokeWidth() float64

Returns the width of the stroke used to draw object outlines.

func (*DrawingWand) GetTextAlignment

func (dw *DrawingWand) GetTextAlignment() AlignType

Returns the alignment applied when annotating with text.

func (*DrawingWand) GetTextAntialias

func (dw *DrawingWand) GetTextAntialias() bool

Returns the current text antialias setting, which determines whether text is antialiased. Text is antialiased by default.

func (*DrawingWand) GetTextDecoration

func (dw *DrawingWand) GetTextDecoration() DecorationType

Returns the decoration applied when annotating with text.

func (*DrawingWand) GetTextEncoding

func (dw *DrawingWand) GetTextEncoding() string

Returns a string which specifies the code set used for text annotations.

func (*DrawingWand) GetTextInterlineSpacing

func (dw *DrawingWand) GetTextInterlineSpacing() float64

Gets the spacing between lines in text.

func (*DrawingWand) GetTextInterwordSpacing

func (dw *DrawingWand) GetTextInterwordSpacing() float64

Gets the spacing between words in text.

func (*DrawingWand) GetTextKerning

func (dw *DrawingWand) GetTextKerning() float64

Gets the spacing between characters in text.

func (*DrawingWand) GetTextUnderColor

func (dw *DrawingWand) GetTextUnderColor() (pw *PixelWand)

Returns the color of a background rectangle to place under text annotations.

func (*DrawingWand) GetVectorGraphics

func (dw *DrawingWand) GetVectorGraphics() string

Returns a string which specifies the vector graphics generated by any graphics calls made since the wand was instantiated.

func (*DrawingWand) IncreaseCount added in v1.1.0

func (dw *DrawingWand) IncreaseCount()

Increase DrawingWand ref counter and set according "can`t be terminated status"

func (*DrawingWand) IsVerified

func (dw *DrawingWand) IsVerified() bool

Returns true if the wand is verified as a drawing wand.

func (*DrawingWand) Line

func (dw *DrawingWand) Line(sx, sy, ex, ey float64)

Draws a line on the image using the current stroke color, stroke opacity, and stroke width.

sx: starting x ordinate

sy: starting y ordinate

ex: ending x ordinate

ey: ending y ordinate

func (*DrawingWand) Matte

func (dw *DrawingWand) Matte(x, y float64, pmethod PaintMethod)

Deprecated in ImageMagick-7.x Use Alpha()

func (*DrawingWand) PathClose

func (dw *DrawingWand) PathClose()

Adds a path element to the current path which closes the current subpath by drawing a straight line from the current point to the current subpath's most recent starting point (usually, the most recent moveto point).

func (*DrawingWand) PathCurveToAbsolute

func (dw *DrawingWand) PathCurveToAbsolute(x1, y1, x2, y2, x, y float64)

Draws a cubic Bezier curve from the current point to (x,y) using (x1,y1) as the control point at the beginning of the curve and (x2,y2) as the control point at the end of the curve using absolute coordinates. At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybezier.

x1, y1: x, y ordinates of control point for curve beginning

x2, y2: x, y ordinates of control point for curve ending

x, y: x, y ordinates of the end of the curve

func (*DrawingWand) PathCurveToQuadraticBezierAbsolute

func (dw *DrawingWand) PathCurveToQuadraticBezierAbsolute(x1, y1, x, y float64)

Draws a quadratic Bezier curve from the current point to (x,y) using (x1,y1) as the control point using absolute coordinates. At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybezier.

x1, y1: ordinates of the control point

x, y: ordinates of final point

func (*DrawingWand) PathCurveToQuadraticBezierRelative

func (dw *DrawingWand) PathCurveToQuadraticBezierRelative(x1, y1, x, y float64)

Draws a quadratic Bezier curve from the current point to (x,y) using (x1,y1) as the control point using relative coordinates. At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybezier. x1, y1: ordinates of the control point x, y: ordinates of final point

func (*DrawingWand) PathCurveToQuadraticBezierSmoothAbsolute

func (dw *DrawingWand) PathCurveToQuadraticBezierSmoothAbsolute(x, y float64)

Draws a quadratic Bezier curve (using absolute coordinates) from the current point to (x,y). The control point is assumed to be the reflection of the control point on the previous command relative to the current point. (If there is no previous command or if the previous command was not a PathCurveToQuadraticBezierAbsolute, PathCurveToQuadraticBezierRelative, PathCurveToQuadraticBezierSmoothAbsolute or PathCurveToQuadraticBezierSmoothRelative, assume the control point is coincident with the current point.). At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybezier.

x, y: ordinates of final point

func (*DrawingWand) PathCurveToQuadraticBezierSmoothRelative

func (dw *DrawingWand) PathCurveToQuadraticBezierSmoothRelative(x, y float64)

Draws a quadratic Bezier curve (using relative coordinates) from the current point to (x,y). The control point is assumed to be the reflection of the control point on the previous command relative to the current point. (If there is no previous command or if the previous command was not a PathCurveToQuadraticBezierAbsolute, PathCurveToQuadraticBezierRelative, PathCurveToQuadraticBezierSmoothAbsolute or PathCurveToQuadraticBezierSmoothRelative, assume the control point is coincident with the current point.). At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybezier.

x, y: ordinates of final point

func (*DrawingWand) PathCurveToRelative

func (dw *DrawingWand) PathCurveToRelative(x1, y1, x2, y2, x, y float64)

Draws a cubic Bezier curve from the current point to (x,y) using (x1,y1) as the control point at the beginning of the curve and (x2,y2) as the control point at the end of the curve using relative coordinates. At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybezier.

x1, y1: x, y ordinates of control point for curve beginning

x2, y2: x, y ordinates of control point for curve ending

x, y: x, y ordinates of the end of the curve

func (*DrawingWand) PathCurveToSmoothAbsolute

func (dw *DrawingWand) PathCurveToSmoothAbsolute(x2, y2, x, y float64)

Draws a cubic Bezier curve from the current point to (x,y) using absolute coordinates. The first control point is assumed to be the reflection of the second control point on the previous command relative to the current point. (If there is no previous command or if the previous command was not an PathCurveToAbsolute, PathCurveToRelative, PathCurveToSmoothAbsolute or PathCurveToSmoothRelative, assume the first control point is coincident with the current point.) (x2,y2) is the second control point (i.e., the control point at the end of the curve). At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybezier.

x2, y2: ordinates of second control point

x, y: ordinates of termination point

func (*DrawingWand) PathCurveToSmoothRelative

func (dw *DrawingWand) PathCurveToSmoothRelative(x2, y2, x, y float64)

Draws a cubic Bezier curve from the current point to (x,y) using relative coordinates. The first control point is assumed to be the reflection of the second control point on the previous command relative to the current point. (If there is no previous command or if the previous command was not an PathCurveToAbsolute, PathCurveToRelative, PathCurveToSmoothAbsolute or PathCurveToSmoothRelative, assume the first control point is coincident with the current point.) (x2,y2) is the second control point (i.e., the control point at the end of the curve). At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybezier.

x2, y2: ordinates of second control point

x, y: ordinates of termination point

func (*DrawingWand) PathEllipticArcAbsolute

func (dw *DrawingWand) PathEllipticArcAbsolute(rx, ry, xAxisRotation float64, largeArcFlag, sweepFlag bool, x, y float64)

Draws an elliptical arc from the current point to (x, y) using absolute coordinates. The size and orientation of the ellipse are defined by two radii (rx, ry) and an xAxisRotation, which indicates how the ellipse as a whole is rotated relative to the current coordinate system. The center (cx, cy) of the ellipse is calculated automagically to satisfy the constraints imposed by the other parameters. largeArcFlag and sweepFlag contribute to the automatic calculations and help determine how the arc is drawn. If largeArcFlag is true then draw the larger of the available arcs. If sweepFlag is true, then draw the arc matching a clock-wise rotation.

rx, ry: x, y radius

xAxisRotation: indicates how the ellipse as a whole is rotated relative to the current coordinate system

largeArcFlag: If true then draw the larger of the available arcs

sweepFlag: If true then draw the arc matching a clock-wise rotation

func (*DrawingWand) PathEllipticArcRelative

func (dw *DrawingWand) PathEllipticArcRelative(rx, ry, xAxisRotation float64, largeArcFlag, sweepFlag bool, x, y float64)

Draws an elliptical arc from the current point to (x, y) using relative coordinates. The size and orientation of the ellipse are defined by two radii (rx, ry) and an xAxisRotation, which indicates how the ellipse as a whole is rotated relative to the current coordinate system. The center (cx, cy) of the ellipse is calculated automagically to satisfy the constraints imposed by the other parameters. largeArcFlag and sweepFlag contribute to the automatic calculations and help determine how the arc is drawn. If largeArcFlag is true then draw the larger of the available arcs. If sweepFlag is true, then draw the arc matching a clock-wise rotation.

rx, ry: x, y radius

xAxisRotation: indicates how the ellipse as a whole is rotated relative to the current coordinate system

largeArcFlag: If true then draw the larger of the available arcs

sweepFlag: If true then draw the arc matching a clock-wise rotation

func (*DrawingWand) PathFinish

func (dw *DrawingWand) PathFinish()

Terminates the current path.

func (*DrawingWand) PathLineToAbsolute

func (dw *DrawingWand) PathLineToAbsolute(x, y float64)

Draws a line path from the current point to the given coordinate using absolute coordinates. The coordinate then becomes the new current point.

x, y: target x and y ordinates

func (*DrawingWand) PathLineToHorizontalAbsolute

func (dw *DrawingWand) PathLineToHorizontalAbsolute(x float64)

Draws a horizontal line path from the current point to the target point using absolute coordinates. The target point then becomes the new current point.

x: target x ordinate

func (*DrawingWand) PathLineToHorizontalRelative

func (dw *DrawingWand) PathLineToHorizontalRelative(x float64)

Draws a horizontal line path from the current point to the target point using relative coordinates. The target point then becomes the new current point.

x: target x ordinate

func (*DrawingWand) PathLineToRelative

func (dw *DrawingWand) PathLineToRelative(x, y float64)

Draws a line path from the current point to the given coordinate using relative coordinates. The coordinate then becomes the new current point.

x, y: target x and y ordinates

func (*DrawingWand) PathLineToVerticalAbsolute

func (dw *DrawingWand) PathLineToVerticalAbsolute(y float64)

Draws a vertical line path from the current point to the target point using absolute coordinates. The target point then becomes the new current point.

y: target y ordinate

func (*DrawingWand) PathLineToVerticalRelative

func (dw *DrawingWand) PathLineToVerticalRelative(y float64)

Draws a vertical line path from the current point to the target point using relative coordinates. The target point then becomes the new current point.

y: target y ordinate

func (*DrawingWand) PathMoveToAbsolute

func (dw *DrawingWand) PathMoveToAbsolute(x, y float64)

Starts a new sub-path at the given coordinate using absolute coordinates. The current point then becomes the specified coordinate.

x, y: target x and y ordinates

func (*DrawingWand) PathMoveToRelative

func (dw *DrawingWand) PathMoveToRelative(x, y float64)

Starts a new sub-path at the given coordinate using relative coordinates. The current point then becomes the specified coordinate.

x, y: target x and y ordinates

func (*DrawingWand) PathStart

func (dw *DrawingWand) PathStart()

Declares the start of a path drawing list which is terminated by a matching PathFinish() command. All other Path commands must be enclosed between a PathStart() and a PathFinish() command. This is because path drawing commands are subordinate commands and they do not function by themselves.

func (*DrawingWand) PeekDrawingWand

func (dw *DrawingWand) PeekDrawingWand() *DrawInfo

Returns the current drawing wand.

func (*DrawingWand) Point

func (dw *DrawingWand) Point(x, y float64)

Draws a point using the current fill color.

x, y: target x, y coordinates

func (*DrawingWand) Polygon

func (dw *DrawingWand) Polygon(coordinates []PointInfo)

Draws a polygon using the current stroke, stroke width, and fill color or texture, using the specified array of coordinates.

func (*DrawingWand) Polyline

func (dw *DrawingWand) Polyline(coordinates []PointInfo)

Draws a polyline using the current stroke, stroke width, and fill color or texture, using the specified array of coordinates.

func (*DrawingWand) PopClipPath

func (dw *DrawingWand) PopClipPath()

Terminates a clip path definition.

func (*DrawingWand) PopDefs

func (dw *DrawingWand) PopDefs()

Terminates a definition list.

func (*DrawingWand) PopDrawingWand

func (dw *DrawingWand) PopDrawingWand() error

Destroys the current drawing wand and returns to the previously pushed drawing wand. Multiple drawing wands may exist. It is an error to attempt to pop more drawing wands than have been pushed, and it is proper form to pop all drawing wands which have been pushed.

func (*DrawingWand) PopPattern

func (dw *DrawingWand) PopPattern() error

Terminates a pattern definition.

func (*DrawingWand) PushClipPath

func (dw *DrawingWand) PushClipPath(clipMaskId string)

Starts a clip path definition which is comprized of any number of drawing commands and terminated by a DrawPopClipPath() command.

clipMaskId: string identifier to associate with the clip path for later use.

func (*DrawingWand) PushDefs

func (dw *DrawingWand) PushDefs()

Indicates that commands up to a terminating PopDefs() command create named elements (e.g. clip-paths, textures, etc.) which may safely be processed earlier for the sake of efficiency.

func (*DrawingWand) PushDrawingWand

func (dw *DrawingWand) PushDrawingWand() error

Clones the current drawing wand to create a new drawing wand. The original drawing wand(s) may be returned to by invoking PopDrawingWand(). The drawing wands are stored on a drawing wand stack. For every Pop there must have already been an equivalent Push.

func (*DrawingWand) PushPattern

func (dw *DrawingWand) PushPattern(patternId string, x, y, width, height float64) error

Indicates that subsequent commands up to a PopPattern() command comprise the definition of a named pattern. The pattern space is assigned top left corner coordinates, a width and height, and becomes its own drawing space. Anything which can be drawn may be used in a pattern definition. Named patterns may be used as stroke or brush definitions.

patternId: pattern identification for later reference

x, y: ordinates of top left corner

width, height of pattern space

func (*DrawingWand) Rectangle

func (dw *DrawingWand) Rectangle(x1, y1, x2, y2 float64)

Draws a rectangle given two coordinates and using the current stroke, stroke width, and fill settings.

x1, y1: ordinates of first coordinate

x2, y2: ordinates of second coordinate

func (*DrawingWand) ResetVectorGraphics

func (dw *DrawingWand) ResetVectorGraphics()

Resets the vector graphics associated with the specified wand.

func (*DrawingWand) Rotate

func (dw *DrawingWand) Rotate(degrees float64)

Applies the specified rotation to the current coordinate space.

degrees: degrees of rotation

func (*DrawingWand) RoundRectangle

func (dw *DrawingWand) RoundRectangle(x1, y1, x2, y2, rx, ry float64)

Draws a rounted rectangle given two coordinates, x & y corner radiuses and using the current stroke, stroke width, and fill settings.

x1, y1: ordinates of first coordinate

x2, y2: ordinates of second coordinate

rx, ry: radius of corner in horizontal and vertical directions

func (*DrawingWand) Scale

func (dw *DrawingWand) Scale(x, y float64)

Adjusts the scaling factor to apply in the horizontal and vertical directions to the current coordinate space.

x: horizontal scale factor

y: vertical scale factor

func (*DrawingWand) SetBorderColor

func (dw *DrawingWand) SetBorderColor(borderWand *PixelWand)

Sets the border color to be used for drawing bordered objects.

func (*DrawingWand) SetClipPath

func (dw *DrawingWand) SetClipPath(clipMaskId string) error

Associates a named clipping path with the image. Only the areas drawn on by the clipping path will be modified as C.ssize_t(as) it remains in effect. clipMaskId: name of clipping path to associate with image

func (*DrawingWand) SetClipRule

func (dw *DrawingWand) SetClipRule(fillRule FillRule)

Set the polygon fill rule to be used by the clipping path.

func (*DrawingWand) SetClipUnits

func (dw *DrawingWand) SetClipUnits(clipUnits ClipPathUnits)

Sets the interpretation of clip path units. clipUnits: units to use

func (*DrawingWand) SetFillColor

func (dw *DrawingWand) SetFillColor(fillWand *PixelWand)

Sets the fill color to be used for drawing filled objects.

func (*DrawingWand) SetFillOpacity

func (dw *DrawingWand) SetFillOpacity(opacity float64)

Sets the opacity to use when drawing using the fill color or fill texture. Fully opaque is 1.0.

func (*DrawingWand) SetFillPatternURL

func (dw *DrawingWand) SetFillPatternURL(fillUrl string) error

Sets the URL to use as a fill pattern for filling objects. Only local URLs ("#identifier") are supported at this time. These local URLs are normally created by defining a named fill pattern with PushPattern/PopPattern.

fillUrl: URL to use to obtain fill pattern.

func (*DrawingWand) SetFillRule

func (dw *DrawingWand) SetFillRule(fillRule FillRule)

Sets the fill rule to use while drawing polygons.

func (*DrawingWand) SetFont

func (dw *DrawingWand) SetFont(fontName string) error

Sets the fully-sepecified font to use when annotating with text.

func (*DrawingWand) SetFontFamily

func (dw *DrawingWand) SetFontFamily(fontFamily string) error

Sets the font family to use when annotating with text.

func (*DrawingWand) SetFontResolution

func (dw *DrawingWand) SetFontResolution(xRes, yRes float64) error

Sets the image resolution.

xRes, yRes: the image x and y resolutions

func (*DrawingWand) SetFontSize

func (dw *DrawingWand) SetFontSize(pointSize float64)

Sets the font pointsize to use when annotating with text.

pointSize: text pointsize

func (*DrawingWand) SetFontStretch

func (dw *DrawingWand) SetFontStretch(fontStretch StretchType)

Sets the font stretch to use when annotating with text. The AnyStretch enumeration acts as a wild-card "don't care" option.

func (*DrawingWand) SetFontStyle

func (dw *DrawingWand) SetFontStyle(style StyleType)

Sets the font style to use when annotating with text. The AnyStyle enumeration acts as a wild-card "don't care" option.

func (*DrawingWand) SetFontWeight

func (dw *DrawingWand) SetFontWeight(fontWeight uint)

Sets the font weight to use when annotating with text.

fontWeight: font weight (valid range 100-900)

func (*DrawingWand) SetGravity

func (dw *DrawingWand) SetGravity(gravity GravityType)

Sets the text placement gravity to use when annotating with text.

func (*DrawingWand) SetOpacity

func (dw *DrawingWand) SetOpacity(opacity float64)

Sets the opacity to use when drawing using the fill or stroke color or texture. Fully opaque is 1.0.

func (*DrawingWand) SetStrokeAntialias

func (dw *DrawingWand) SetStrokeAntialias(antialias bool)

Controls whether stroked outlines are antialiased. Stroked outlines are antialiased by default. When antialiasing is disabled stroked pixels are thresholded to determine if the stroke color or underlying canvas color should be used.

antialias: set to false to disable antialiasing

func (*DrawingWand) SetStrokeColor

func (dw *DrawingWand) SetStrokeColor(strokeWand *PixelWand)

Sets the color used for stroking object outlines.

func (*DrawingWand) SetStrokeDashArray

func (dw *DrawingWand) SetStrokeDashArray(dash []float64) error

Specifies the pattern of dashes and gaps used to stroke paths. The stroke dash array represents an array of numbers that specify the lengths of alternating dashes and gaps in pixels. If an odd number of values is provided, then the list of values is repeated to yield an even number of values. To remove an existing dash array, pass an empty slice. A typical stroke dash array might contain the members 5 3 2.

func (*DrawingWand) SetStrokeDashOffset

func (dw *DrawingWand) SetStrokeDashOffset(offset float64)

Specifies the offset into the dash pattern to start the dash.

func (*DrawingWand) SetStrokeLineCap

func (dw *DrawingWand) SetStrokeLineCap(lineCap LineCap)

Specifies the shape to be used at the end of open subpaths when they are stroked.

func (*DrawingWand) SetStrokeLineJoin

func (dw *DrawingWand) SetStrokeLineJoin(lineJoin LineJoin)

Specifies the shape to be used at the corners of paths (or other vector shapes) when they are stroked.

func (*DrawingWand) SetStrokeMiterLimit

func (dw *DrawingWand) SetStrokeMiterLimit(miterLimit uint)

Specifies the miter limit. When two line segments meet at a sharp angle and miter joins have been specified for 'lineJoin', it is possible for the miter to extend far beyond the thickness of the line stroking the path. The miterLimit' imposes a limit on the ratio of the miter length to the 'lineWidth'.

func (*DrawingWand) SetStrokeOpacity

func (dw *DrawingWand) SetStrokeOpacity(opacity float64)

Specifies the opacity of stroked object outlines.

opacity: stroke opacity. The value 1.0 is opaque.

func (*DrawingWand) SetStrokePatternURL

func (dw *DrawingWand) SetStrokePatternURL(strokeUrl string) error

Sets the pattern used for stroking object outlines.

strokeUrl: URL specifying pattern ID (e.g. "#pattern_id")

func (*DrawingWand) SetStrokeWidth

func (dw *DrawingWand) SetStrokeWidth(width float64)

Sets the width of the stroke used to draw object outlines.

func (*DrawingWand) SetTextAlignment

func (dw *DrawingWand) SetTextAlignment(alignment AlignType)

Specifies a text alignment to be applied when annotating with text.

func (*DrawingWand) SetTextAntialias

func (dw *DrawingWand) SetTextAntialias(antialias bool)

Controls whether text is antialiased. Text is antialiased by default.

func (*DrawingWand) SetTextDecoration

func (dw *DrawingWand) SetTextDecoration(decoration DecorationType)

Specifies a decoration to be applied when annotating with text.

func (*DrawingWand) SetTextEncoding

func (dw *DrawingWand) SetTextEncoding(encoding string)

Specifies the code set to use for text annotations. The only character encoding which may be specified at this time is "UTF-8" for representing Unicode as a sequence of bytes. Specify an empty string to set text encoding to the system's default. Successful text annotation using Unicode may require fonts designed to support Unicode.

func (*DrawingWand) SetTextInterlineSpacing

func (dw *DrawingWand) SetTextInterlineSpacing(spacing float64)

Sets the spacing between line in text.

func (*DrawingWand) SetTextInterwordSpacing

func (dw *DrawingWand) SetTextInterwordSpacing(spacing float64)

Sets the spacing between words in text.

func (*DrawingWand) SetTextKerning

func (dw *DrawingWand) SetTextKerning(kerning float64)

Sets the spacing between characters in text.

func (*DrawingWand) SetTextUnderColor

func (dw *DrawingWand) SetTextUnderColor(underWand *PixelWand)

Specifies the color of a background rectangle to place under text annotations.

func (*DrawingWand) SetVectorGraphics

func (dw *DrawingWand) SetVectorGraphics(xml string) error

Sets the vector graphics associated with the specified wand. Use this method with GetVectorGraphics() as a method to persist the vector graphics state.

func (*DrawingWand) SetViewbox

func (dw *DrawingWand) SetViewbox(x1, y1, x2, y2 float64)

Sets the overall canvas size to be recorded with the drawing vector data. Usually this will be specified using the same size as the canvas image. When the vector data is saved to SVG or MVG formats, the viewbox is use to specify the size of the canvas image that a viewer will render the vector data on.

x1: left x ordinate

y1: top y ordinate

x2: right x ordinate

y2: bottom y ordinate

func (*DrawingWand) SkewX

func (dw *DrawingWand) SkewX(degrees float64)

Skews the current coordinate system in the horizontal direction.

degrees: number of degrees to skew the coordinates

func (*DrawingWand) SkewY

func (dw *DrawingWand) SkewY(degrees float64)

Skews the current coordinate system in the vertical direction.

degrees: number of degrees to skew the coordinates

func (*DrawingWand) Translate

func (dw *DrawingWand) Translate(x, y float64)

Applies a translation to the current coordinate system which moves the coordinate system origin to the specified coordinate.

x, y: new x, y ordinate for coordinate system origin

type DrawingWandException

type DrawingWandException struct {
	// contains filtered or unexported fields
}

func (*DrawingWandException) Error

func (dwe *DrawingWandException) Error() string

type EndianType

type EndianType int
const (
	ENDIAN_UNDEFINED EndianType = C.UndefinedEndian
	ENDIAN_LSB       EndianType = C.LSBEndian
	ENDIAN_MSB       EndianType = C.MSBEndian
)

type EvaluateOperator

type EvaluateOperator int
const (
	EVAL_OP_UNDEFINED            EvaluateOperator = C.UndefinedEvaluateOperator
	EVAL_OP_ADD                  EvaluateOperator = C.AddEvaluateOperator
	EVAL_OP_AND                  EvaluateOperator = C.AndEvaluateOperator
	EVAL_OP_DIVIDE               EvaluateOperator = C.DivideEvaluateOperator
	EVAL_OP_LEFT_SHIFT           EvaluateOperator = C.LeftShiftEvaluateOperator
	EVAL_OP_MAX                  EvaluateOperator = C.MaxEvaluateOperator
	EVAL_OP_MIN                  EvaluateOperator = C.MinEvaluateOperator
	EVAL_OP_MULTIPLY             EvaluateOperator = C.MultiplyEvaluateOperator
	EVAL_OP_OR                   EvaluateOperator = C.OrEvaluateOperator
	EVAL_OP_RIGHT_SHIFT          EvaluateOperator = C.RightShiftEvaluateOperator
	EVAL_OP_SET                  EvaluateOperator = C.SetEvaluateOperator
	EVAL_OP_SUBTRACT             EvaluateOperator = C.SubtractEvaluateOperator
	EVAL_OP_XOR                  EvaluateOperator = C.XorEvaluateOperator
	EVAL_OP_POW                  EvaluateOperator = C.PowEvaluateOperator
	EVAL_OP_LOG                  EvaluateOperator = C.LogEvaluateOperator
	EVAL_OP_THRESHOLD            EvaluateOperator = C.ThresholdEvaluateOperator
	EVAL_OP_THRESHOLD_BLACK      EvaluateOperator = C.ThresholdBlackEvaluateOperator
	EVAL_OP_THRESHOLD_WHITE      EvaluateOperator = C.ThresholdWhiteEvaluateOperator
	EVAL_OP_GAUSSIAN_NOISE       EvaluateOperator = C.GaussianNoiseEvaluateOperator
	EVAL_OP_IMPULSE_NOISE        EvaluateOperator = C.ImpulseNoiseEvaluateOperator
	EVAL_OP_LAPLACIAN_NOISE      EvaluateOperator = C.LaplacianNoiseEvaluateOperator
	EVAL_OP_MULTIPLICATIVE_NOISE EvaluateOperator = C.MultiplicativeNoiseEvaluateOperator
	EVAL_OP_POISSON_NOISE        EvaluateOperator = C.PoissonNoiseEvaluateOperator
	EVAL_OP_UNIFORM_NOISE        EvaluateOperator = C.UniformNoiseEvaluateOperator
	EVAL_OP_COSINE               EvaluateOperator = C.CosineEvaluateOperator
	EVAL_OP_SINE                 EvaluateOperator = C.SineEvaluateOperator
	EVAL_OP_ADD_MODULUS          EvaluateOperator = C.AddModulusEvaluateOperator
	EVAL_OP_MEAN                 EvaluateOperator = C.MeanEvaluateOperator
	EVAL_OP_ABS                  EvaluateOperator = C.AbsEvaluateOperator
	EVAL_OP_EXPONENTIAL          EvaluateOperator = C.ExponentialEvaluateOperator
	EVAL_OP_MEDIAN               EvaluateOperator = C.MedianEvaluateOperator
	EVAL_OP_SUM                  EvaluateOperator = C.SumEvaluateOperator
)

type ExceptionInfo

type ExceptionInfo struct {
	// contains filtered or unexported fields
}

ExceptionInfo is an error type returned by certain New* API calls.

func (*ExceptionInfo) Description

func (e *ExceptionInfo) Description() string

Description returns the string description for the Exception

func (*ExceptionInfo) Errno

func (e *ExceptionInfo) Errno() int

Errno returns the ExceptionInfo error number (non-zero if error)

func (*ExceptionInfo) Error

func (e *ExceptionInfo) Error() string

func (*ExceptionInfo) Reason

func (e *ExceptionInfo) Reason() string

Reason returns the string reason for the Exception

type ExceptionType

type ExceptionType int
const (
	EXCEPTION_UNDEFINED          ExceptionType = C.UndefinedException
	EXCEPTION_WARNING            ExceptionType = C.WarningException
	WARNING_RESOURCE_LIMIT       ExceptionType = C.ResourceLimitWarning
	WARNING_TYPE                 ExceptionType = C.TypeWarning
	WARNING_OPTION               ExceptionType = C.OptionWarning
	WARNING_DELEGATE             ExceptionType = C.DelegateWarning
	WARNING_MISSING_DELEGATE     ExceptionType = C.MissingDelegateWarning
	WARNING_CORRUPT_IMAGE        ExceptionType = C.CorruptImageWarning
	WARNING_FILE_OPEN            ExceptionType = C.FileOpenWarning
	WARNING_BLOB                 ExceptionType = C.BlobWarning
	WARNING_STREAM               ExceptionType = C.StreamWarning
	WARNING_CACHE                ExceptionType = C.CacheWarning
	WARNING_CODER                ExceptionType = C.CoderWarning
	WARNING_FILTER               ExceptionType = C.FilterWarning
	WARNING_MODULE               ExceptionType = C.ModuleWarning
	WARNING_DRAW                 ExceptionType = C.DrawWarning
	WARNING_IMAGE                ExceptionType = C.ImageWarning
	WARNING_WAND                 ExceptionType = C.WandWarning
	WARNING_RANDOM               ExceptionType = C.RandomWarning
	WARNING_XSERVER              ExceptionType = C.XServerWarning
	WARNING_MONITOR              ExceptionType = C.MonitorWarning
	WARNING_REGISTRY             ExceptionType = C.RegistryWarning
	WARNING_CONFIGURE            ExceptionType = C.ConfigureWarning
	WARNING_POLICY               ExceptionType = C.PolicyWarning
	EXCEPTION_ERROR              ExceptionType = C.ErrorException
	ERROR_RESOURCE_LIMIT         ExceptionType = C.ResourceLimitError
	ERROR_TYPE                   ExceptionType = C.TypeError
	ERROR_OPTION                 ExceptionType = C.OptionError
	ERROR_DELEGATE               ExceptionType = C.DelegateError
	ERROR_MISSING_DELEGATE       ExceptionType = C.MissingDelegateError
	ERROR_CORRUPT_IMAGE          ExceptionType = C.CorruptImageError
	ERROR_FILE_OPEN              ExceptionType = C.FileOpenError
	ERROR_BLOB                   ExceptionType = C.BlobError
	ERROR_STREAM                 ExceptionType = C.StreamError
	ERROR_CACHE                  ExceptionType = C.CacheError
	ERROR_CODER                  ExceptionType = C.CoderError
	ERROR_FILTER                 ExceptionType = C.FilterError
	ERROR_MODULE                 ExceptionType = C.ModuleError
	ERROR_DRAW                   ExceptionType = C.DrawError
	ERROR_IMAGE                  ExceptionType = C.ImageError
	ERROR_WAND                   ExceptionType = C.WandError
	ERROR_RANDOM                 ExceptionType = C.RandomError
	ERROR_XSERVER                ExceptionType = C.XServerError
	ERROR_MONITOR                ExceptionType = C.MonitorError
	ERROR_REGISTRY               ExceptionType = C.RegistryError
	ERROR_CONFIGURE              ExceptionType = C.ConfigureError
	ERROR_POLICY                 ExceptionType = C.PolicyError
	EXCEPTION_FATAL_ERROR        ExceptionType = C.FatalErrorException
	FATAL_ERROR_RESOURCE_LIMIT   ExceptionType = C.ResourceLimitFatalError
	FATAL_ERROR_TYPE             ExceptionType = C.TypeFatalError
	FATAL_ERROR_OPTION           ExceptionType = C.OptionFatalError
	FATAL_ERROR_DELEGATE         ExceptionType = C.DelegateFatalError
	FATAL_ERROR_MISSING_DELEGATE ExceptionType = C.MissingDelegateFatalError
	FATAL_ERROR_CORRUPT_IMAGE    ExceptionType = C.CorruptImageFatalError
	FATAL_ERROR_FILE_OPEN        ExceptionType = C.FileOpenFatalError
	FATAL_ERROR_BLOB             ExceptionType = C.BlobFatalError
	FATAL_ERROR_STREAM           ExceptionType = C.StreamFatalError
	FATAL_ERROR_CACHE            ExceptionType = C.CacheFatalError
	FATAL_ERROR_CODER            ExceptionType = C.CoderFatalError
	FATAL_ERROR_FILTER           ExceptionType = C.FilterFatalError
	FATAL_ERROR_MODULE           ExceptionType = C.ModuleFatalError
	FATAL_ERROR_DRAW             ExceptionType = C.DrawFatalError
	FATAL_ERROR_IMAGE            ExceptionType = C.ImageFatalError
	FATAL_ERROR_WAND             ExceptionType = C.WandFatalError
	FATAL_ERROR_RANDOM           ExceptionType = C.RandomFatalError
	FATAL_ERROR_XSERVER          ExceptionType = C.XServerFatalError
	FATAL_ERROR_MONITOR          ExceptionType = C.MonitorFatalError
	FATAL_ERROR_REGISTRY         ExceptionType = C.RegistryFatalError
	FATAL_ERROR_CONFIGURE        ExceptionType = C.ConfigureFatalError
	FATAL_ERROR_POLICY           ExceptionType = C.PolicyFatalError
)

func (*ExceptionType) String

func (et *ExceptionType) String() string

type FillRule

type FillRule int
const (
	FILL_UNDEFINED FillRule = C.UndefinedRule
	FILL_EVEN_ODD  FillRule = C.EvenOddRule
	FILL_NON_ZERO  FillRule = C.NonZeroRule
)

type FilterType

type FilterType int
const (
	FILTER_UNDEFINED      FilterType = C.UndefinedFilter
	FILTER_POINT          FilterType = C.PointFilter
	FILTER_BOX            FilterType = C.BoxFilter
	FILTER_TRIANGLE       FilterType = C.TriangleFilter
	FILTER_HERMITE        FilterType = C.HermiteFilter
	FILTER_HANNING        FilterType = C.HanningFilter
	FILTER_HAMMING        FilterType = C.HammingFilter
	FILTER_BLACKMAN       FilterType = C.BlackmanFilter
	FILTER_GAUSSIAN       FilterType = C.GaussianFilter
	FILTER_QUADRATIC      FilterType = C.QuadraticFilter
	FILTER_CUBIC          FilterType = C.CubicFilter
	FILTER_CATROM         FilterType = C.CatromFilter
	FILTER_MITCHELL       FilterType = C.MitchellFilter
	FILTER_JINC           FilterType = C.JincFilter
	FILTER_SINC           FilterType = C.SincFilter
	FILTER_SINC_FAST      FilterType = C.SincFastFilter
	FILTER_KAISER         FilterType = C.KaiserFilter
	FILTER_WELSH          FilterType = C.WelshFilter
	FILTER_PARZEN         FilterType = C.ParzenFilter
	FILTER_BOHMAN         FilterType = C.BohmanFilter
	FILTER_BARTLETT       FilterType = C.BartlettFilter
	FILTER_LAGRANGE       FilterType = C.LagrangeFilter
	FILTER_LANCZOS        FilterType = C.LanczosFilter
	FILTER_LANCZOS_SHARP  FilterType = C.LanczosSharpFilter
	FILTER_LANCZOS2       FilterType = C.Lanczos2Filter
	FILTER_LANCZOS2_SHARP FilterType = C.Lanczos2SharpFilter
	FILTER_ROBIDOUX       FilterType = C.RobidouxFilter
	FILTER_ROBIDOUX_SHARP FilterType = C.RobidouxSharpFilter
	FILTER_COSINE         FilterType = C.CosineFilter
	FILTER_SPLINE         FilterType = C.SplineFilter
	FILTER_SENTINEL       FilterType = C.SentinelFilter
	FILTER_LANCZOS_RADIUS FilterType = C.LanczosRadiusFilter
)

type FontMetrics

type FontMetrics struct {
	CharacterWidth           float64
	CharacterHeight          float64
	Ascender                 float64
	Descender                float64
	TextWidth                float64
	TextHeight               float64
	MaximumHorizontalAdvance float64
	BoundingBoxX1            float64
	BoundingBoxY1            float64
	BoundingBoxX2            float64
	BoundingBoxY2            float64
	OriginX                  float64
	OriginY                  float64
}

func NewFontMetricsFromArray

func NewFontMetricsFromArray(arr []float64) *FontMetrics

type GeometryInfo

type GeometryInfo struct {
	// contains filtered or unexported fields
}

type GravityType

type GravityType int
const (
	GRAVITY_UNDEFINED  GravityType = C.UndefinedGravity
	GRAVITY_FORGET     GravityType = C.ForgetGravity
	GRAVITY_NORTH_WEST GravityType = C.NorthWestGravity
	GRAVITY_NORTH      GravityType = C.NorthGravity
	GRAVITY_NORTH_EAST GravityType = C.NorthEastGravity
	GRAVITY_WEST       GravityType = C.WestGravity
	GRAVITY_CENTER     GravityType = C.CenterGravity
	GRAVITY_EAST       GravityType = C.EastGravity
	GRAVITY_SOUTH_WEST GravityType = C.SouthWestGravity
	GRAVITY_SOUTH      GravityType = C.SouthGravity
	GRAVITY_SOUTH_EAST GravityType = C.SouthEastGravity
)

type Image

type Image struct {
	// contains filtered or unexported fields
}

type ImageInfo

type ImageInfo struct {
	// contains filtered or unexported fields
}

func (*ImageInfo) Destroy

func (ii *ImageInfo) Destroy()

Destroy the ImageInfo immediately. This will also be called automatically during garbage collection.

type ImageLayerMethod

type ImageLayerMethod int
const (
	IMAGE_LAYER_UNDEFINED       ImageLayerMethod = C.UndefinedLayer
	IMAGE_LAYER_COALESCE        ImageLayerMethod = C.CoalesceLayer
	IMAGE_LAYER_COMPARE_ANY     ImageLayerMethod = C.CompareAnyLayer
	IMAGE_LAYER_COMPARE_CLEAR   ImageLayerMethod = C.CompareClearLayer
	IMAGE_LAYER_COMPARE_OVERLAY ImageLayerMethod = C.CompareOverlayLayer
	IMAGE_LAYER_DISPOSE         ImageLayerMethod = C.DisposeLayer
	IMAGE_LAYER_OPTIMIZE        ImageLayerMethod = C.OptimizeLayer
	IMAGE_LAYER_OPTIMIZE_IMAGE  ImageLayerMethod = C.OptimizeImageLayer
	IMAGE_LAYER_OPTIMIZE_PLUS   ImageLayerMethod = C.OptimizePlusLayer
	IMAGE_LAYER_OPTIMIZE_TRANS  ImageLayerMethod = C.OptimizeTransLayer
	IMAGE_LAYER_REMOVE_DUPS     ImageLayerMethod = C.RemoveDupsLayer
	IMAGE_LAYER_REMOVE_ZERO     ImageLayerMethod = C.RemoveZeroLayer
	IMAGE_LAYER_COMPOSITE       ImageLayerMethod = C.CompositeLayer
	IMAGE_LAYER_MERGE           ImageLayerMethod = C.MergeLayer
	IMAGE_LAYER_FLATTEN         ImageLayerMethod = C.FlattenLayer
	IMAGE_LAYER_MOSAIC          ImageLayerMethod = C.MosaicLayer
	IMAGE_LAYER_TRIM_BOUNDS     ImageLayerMethod = C.TrimBoundsLayer
)

type ImageType

type ImageType int
const (
	IMAGE_TYPE_UNDEFINED              ImageType = C.UndefinedType
	IMAGE_TYPE_BILEVEL                ImageType = C.BilevelType
	IMAGE_TYPE_COLOR_SEPARATION       ImageType = C.ColorSeparationType
	IMAGE_TYPE_COLOR_SEPARATION_ALPHA ImageType = C.ColorSeparationAlphaType
	IMAGE_TYPE_GRAYSCALE              ImageType = C.GrayscaleType
	IMAGE_TYPE_GRAYSCALE_ALPHA        ImageType = C.GrayscaleAlphaType
	IMAGE_TYPE_OPTIMIZE               ImageType = C.OptimizeType
	IMAGE_TYPE_PALETTE                ImageType = C.PaletteType
	IMAGE_TYPE_PALETTE_ALPHA          ImageType = C.PaletteAlphaType
	IMAGE_TYPE_PALETTE_BILEVEL_ALPHA  ImageType = C.PaletteBilevelAlphaType
	IMAGE_TYPE_TRUE_COLOR             ImageType = C.TrueColorType
	IMAGE_TYPE_TRUE_COLOR_ALPHA       ImageType = C.TrueColorAlphaType
)

type IndexPacket

type IndexPacket Quantum

type InterlaceType

type InterlaceType int
const (
	INTERLACE_UNDEFINED InterlaceType = C.UndefinedInterlace
	INTERLACE_NO        InterlaceType = C.NoInterlace
	INTERLACE_LINE      InterlaceType = C.LineInterlace
	INTERLACE_PLANE     InterlaceType = C.PlaneInterlace
	INTERLACE_PARTITION InterlaceType = C.PartitionInterlace
	INTERLACE_GIF       InterlaceType = C.GIFInterlace
	INTERLACE_JPEG      InterlaceType = C.JPEGInterlace
	INTERLACE_PNG       InterlaceType = C.PNGInterlace
)

type KernelInfo

type KernelInfo struct {
	// contains filtered or unexported fields
}

This struct represents the KernelInfo C API of ImageMagick

func NewKernelInfo

func NewKernelInfo(kernel string) (*KernelInfo, error)

NewKernelInfo takes the given string (generally supplied by the user) and converts it into a Morphology/Convolution Kernel. This allows users to specify a kernel from a number of pre-defined kernels, or to fully specify their own kernel for a specific Convolution or Morphology Operation.

Returns a *ExceptionInfo on error

Ref: http://www.imagemagick.org/api/morphology.php#AcquireKernelBuiltIn

Details:

The kernel so generated can be any rectangular array of floating point values (doubles) with the 'control point' or 'pixel being affected' anywhere within that array of values.

Previously IM was restricted to a square of odd size using the exact center as origin, this is no longer the case, and any rectangular kernel with any value being declared the origin. This in turn allows the use of highly asymmetrical kernels.

The floating point values in the kernel can also include a special value known as 'nan' or 'not a number' to indicate that this value is not part of the kernel array. This allows you to shaped the kernel within its rectangular area. That is 'nan' values provide a 'mask' for the kernel shape. However at least one non-nan value must be provided for correct working of a kernel.

Input kernel defintion strings can consist of any of three types.

"name:args[[@><]" Select from one of the built in kernels, using the name and geometry arguments supplied. See NewKernelInfoBuiltIn()

"WxH[+X+Y][@><]:num, num, num ..." a kernel of size W by H, with W*H floating point numbers following. the 'center' can be optionally be defined at +X+Y (such that +0+0 is top left corner). If not defined the pixel in the center, for odd sizes, or to the immediate top or left of center for even sizes is automatically selected.

"num, num, num, num, ..." list of floating point numbers defining an 'old style' odd sized square kernel. At least 9 values should be provided for a 3x3 square kernel, 25 for a 5x5 square kernel, 49 for 7x7, etc. Values can be space or comma separated. This is not recommended.

You can define a 'list of kernels' which can be used by some morphology operators A list is defined as a semi-colon separated list kernels.

" kernel ; kernel ; kernel ; "

Any extra ';' characters, at start, end or between kernel defintions are simply ignored.

The special flags will expand a single kernel, into a list of rotated kernels. A '@' flag will expand a 3x3 kernel into a list of 45-degree cyclic rotations, while a '>' will generate a list of 90-degree rotations. The '<' also exands using 90-degree rotates, but giving a 180-degree reflected kernel before the +/- 90-degree rotations, which can be important for Thinning operations.

Note that 'name' kernels will start with an alphabetic character while the new kernel specification has a ':' character in its specification string. If neither is the case, it is assumed an old style of a simple list of numbers generating a odd-sized square kernel has been given.

func NewKernelInfoBuiltIn

func NewKernelInfoBuiltIn(typ KernelInfoType, kernel string) (*KernelInfo, error)

Create a kernel from a builtin in kernel.

Returns an *ExceptionInfo on error

See http://www.imagemagick.org/Usage/morphology/#kernel for examples. Currently the 'rotation' symbols are not supported. Example: kernel_info := NewKernelInfoBuiltIn(KERNEL_RING, "2,1")

func (*KernelInfo) Destroy

func (ki *KernelInfo) Destroy()

Destroy the KernelInfo immediately. This will also be called automatically during garbage collection.

func (*KernelInfo) Scale

func (ki *KernelInfo) Scale(scale float64, normalizeType KernelNormalizeType)

ScaleKernelInfo() scales the given kernel list by the given amount, with or without normalization of the sum of the kernel values (as per given flags). The exact behaviour of this function depends on the normalization type being used please see http://www.imagemagick.org/api/morphology.php#ScaleKernelInfo for details.

Flag should be one of:

KERNEL_NORMALIZE_NONE
KERNEL_NORMALIZE_VALUE
KERNEL_NORMALIZE_CORRELATE
KERNEL_NORMALIZE_PERCENT

func (*KernelInfo) ToArray

func (ki *KernelInfo) ToArray() [][]float64

Convert the current KernelInfo to an 2d-array of values. The values are either a float64 if the element is used, or NaN if the element is not used by the kernel

type KernelInfoType

type KernelInfoType int
const (
	KERNEL_UNDEFINED     KernelInfoType = C.UndefinedKernel /* equivalent to UnityKernel */
	KERNEL_UNITY         KernelInfoType = C.UnityKernel     /* The no-op or 'original image' kernel */
	KERNEL_GAUSSIAN      KernelInfoType = C.GaussianKernel  /* Convolution Kernels Gaussian Based */
	KERNEL_DOG           KernelInfoType = C.DoGKernel
	KERNEL_LOG           KernelInfoType = C.LoGKernel
	KERNEL_BLUR          KernelInfoType = C.BlurKernel
	KERNEL_COMET         KernelInfoType = C.CometKernel
	KERNEL_LAPLACIAN     KernelInfoType = C.LaplacianKernel /* Convolution Kernels by Name */
	KERNEL_SOBEL         KernelInfoType = C.SobelKernel
	KERNEL_FREICHEN      KernelInfoType = C.FreiChenKernel
	KERNEL_ROBERTS       KernelInfoType = C.RobertsKernel
	KERNEL_PREWITT       KernelInfoType = C.PrewittKernel
	KERNEL_COMPASS       KernelInfoType = C.CompassKernel
	KERNEL_KIRSCH        KernelInfoType = C.KirschKernel
	KERNEL_DIAMOND       KernelInfoType = C.DiamondKernel /* Shape Kernels */
	KERNEL_SQUARE        KernelInfoType = C.SquareKernel
	KERNEL_RECTANGLE     KernelInfoType = C.RectangleKernel
	KERNEL_OCTAGON       KernelInfoType = C.OctagonKernel
	KERNEL_DISK          KernelInfoType = C.DiskKernel
	KERNEL_PLUS          KernelInfoType = C.PlusKernel
	KERNEL_CROSS         KernelInfoType = C.CrossKernel
	KERNEL_RING          KernelInfoType = C.RingKernel
	KERNEL_PEAKS         KernelInfoType = C.PeaksKernel /* Hit And Miss Kernels */
	KERNEL_EDGES         KernelInfoType = C.EdgesKernel
	KERNEL_CORNERS       KernelInfoType = C.CornersKernel
	KERNEL_DIAGONALS     KernelInfoType = C.DiagonalsKernel
	KERNEL_LINEENDS      KernelInfoType = C.LineEndsKernel
	KERNEL_LINEJUNCTIONS KernelInfoType = C.LineJunctionsKernel
	KERNEL_RIDGES        KernelInfoType = C.RidgesKernel
	KERNEL_CONVEXHULL    KernelInfoType = C.ConvexHullKernel
	KERNEL_THINSE        KernelInfoType = C.ThinSEKernel
	KERNEL_SKELETON      KernelInfoType = C.SkeletonKernel
	KERNEL_CHEBYSHEV     KernelInfoType = C.ChebyshevKernel /* Distance Measuring Kernels */
	KERNEL_MANHATTAN     KernelInfoType = C.ManhattanKernel
	KERNEL_OCTAGONAL     KernelInfoType = C.OctagonalKernel
	KERNEL_EUCLIDEAN     KernelInfoType = C.EuclideanKernel
	KERNEL_USERDEFINED   KernelInfoType = C.UserDefinedKernel /* User Specified Kernel Array */
	KERNEL_BINOMIAL      KernelInfoType = C.BinomialKernel
)

type KernelNormalizeType

type KernelNormalizeType int
const (
	// The kernel is scaled directly using given scaling factor without change.
	KERNEL_NORMALIZE_NONE KernelNormalizeType = 0

	// Kernel normalization ('normalize_flags' given) is designed to ensure
	// that any use of the kernel scaling factor with 'Convolve' or 'Correlate'
	// morphology methods will fall into -1.0 to +1.0 range.
	KERNEL_NORMALIZE_VALUE KernelNormalizeType = C.NormalizeValue

	// For special kernels designed for locating shapes using 'Correlate', (often
	// only containing +1 and -1 values, representing foreground/brackground
	// matching) a special normalization method is provided to scale the positive
	// values separately to those of the negative values, so the kernel will be
	// forced to become a zero-sum kernel better suited to such searches.
	KERNEL_NORMALIZE_CORRELATE KernelNormalizeType = C.CorrelateNormalizeValue

	// Scale the kernel by a percent.
	KERNEL_NORMALIZE_PERCENT KernelNormalizeType = C.PercentValue
)

type LineCap

type LineCap int
const (
	LINE_CAP_UNDEFINED LineCap = C.UndefinedCap
	LINE_CAP_BUTT      LineCap = C.ButtCap
	LINE_CAP_ROUND     LineCap = C.RoundCap
	LINE_CAP_SQUARE    LineCap = C.SquareCap
)

type LineJoin

type LineJoin int
const (
	LINE_JOIN_UNDEFINED LineJoin = C.UndefinedJoin
	LINE_JOIN_MITER     LineJoin = C.MiterJoin
	LINE_JOIN_ROUND     LineJoin = C.RoundJoin
	LINE_JOIN_BEVEL     LineJoin = C.BevelJoin
)

type MagickFunction

type MagickFunction int
const (
	FUNCTION_UNDEFINED  MagickFunction = C.UndefinedFunction
	FUNCTION_POLYNOMIAL MagickFunction = C.PolynomialFunction
	FUNCTION_SINUSOID   MagickFunction = C.SinusoidFunction
	FUNCTION_ARCSIN     MagickFunction = C.ArcsinFunction
	FUNCTION_ARCTAN     MagickFunction = C.ArctanFunction
)

type MagickWand

type MagickWand struct {
	// contains filtered or unexported fields
}

This struct represents the MagickWand C API of ImageMagick

func NewMagickWand

func NewMagickWand() *MagickWand

Returns a wand required for all other methods in the API. A fatal exception is thrown if there is not enough memory to allocate the wand.

func NewMagickWandFromImage

func NewMagickWandFromImage(img *Image) *MagickWand

Returns a wand with an image

func (*MagickWand) AdaptiveBlurImage

func (mw *MagickWand) AdaptiveBlurImage(radius, sigma float64) error

Adaptively blurs the image by blurring less intensely near image edges and more intensely far from edges. We blur the image with a Gaussian operator of the given radius and standard deviation (sigma). For reasonable results, radius should be larger than sigma. Use a radius of 0 and AdaptiveBlurImage() selects a suitable radius for you.

radius: the radius of the Gaussian, in pixels, not counting the center pixel

sigma: the standard deviation of the Gaussian, in pixels

func (*MagickWand) AdaptiveResizeImage

func (mw *MagickWand) AdaptiveResizeImage(cols, rows uint) error

Adaptively resize image with data dependent triangulation

func (*MagickWand) AdaptiveSharpenImage

func (mw *MagickWand) AdaptiveSharpenImage(radius, sigma float64) error

Adaptively sharpens the image by sharpening more intensely near image edges and less intensely far from edges. We sharpen the image with a Gaussian operator of the given radius and standard deviation (sigma). For reasonable results, radius should be larger than sigma. Use a radius of 0 and AdaptiveSharpenImage() selects a suitable radius for you.

radius: the radius of the Gaussian, in pixels, not counting the center pixel

sigma: the standard deviation of the Gaussian, in pixels.

func (*MagickWand) AdaptiveThresholdImage

func (mw *MagickWand) AdaptiveThresholdImage(width, height uint, offset float64) error

Selects an individual threshold for each pixel based on the range of intensity values in its local neighborhood. This allows for thresholding of an image whose global intensity histogram doesn't contain distinctive peaks.

func (*MagickWand) AddImage

func (mw *MagickWand) AddImage(wand *MagickWand) error

Adds a clone of the images from the second wand and inserts them into the first wand. Use SetLastIterator(), to append new images into an existing wand, current image will be set to last image so later adds with also be appened to end of wand. Use SetFirstIterator() to prepend new images into wand, any more images added will also be prepended before other images in the wand. However the order of a list of new images will not change. Otherwise the new images will be inserted just after the current image, and any later image will also be added after this current image but before the previously added images. Caution is advised when multiple image adds are inserted into the middle of the wand image list.

func (*MagickWand) AddNoiseImage

func (mw *MagickWand) AddNoiseImage(noiseType NoiseType, offset float64) error

Adds random noise to the image

func (*MagickWand) AffineTransformImage

func (mw *MagickWand) AffineTransformImage(drawingWand *DrawingWand) error

Transforms an image as dictaded by the affine matrix of the drawing wand

func (*MagickWand) AnimateImages

func (mw *MagickWand) AnimateImages(server string) error

Animates an image or image sequence

func (*MagickWand) AnnotateImage

func (mw *MagickWand) AnnotateImage(drawingWand *DrawingWand, x, y, angle float64, text string) error

Annotates an image with text

x: ordinate to left of text

y: ordinate to text baseline

angle: rotate text relative to this angle

func (*MagickWand) AppendImages

func (mw *MagickWand) AppendImages(topToBottom bool) *MagickWand

Append the images in a wand from the current image onwards, creating a new wand with the single image result. This is affected by the gravity and background setting of the first image. Typically you would call either ResetIterator() or SetFirstImage() before calling this function to ensure that all the images in the wand's image list will be appended together. By default, images are stacked left-to-right. Set topToBottom to true to stack them top-to-bottom.

func (*MagickWand) AutoGammaImage

func (mw *MagickWand) AutoGammaImage() error

Extracts the 'mean' from the image and adjust the image to try make set it's gamma appropriatally

func (*MagickWand) AutoLevelImage

func (mw *MagickWand) AutoLevelImage() error

Adjust the levels of a particular image by scaling the minimum and maximum values to the full quantum range.

func (*MagickWand) AutoOrientImage

func (mw *MagickWand) AutoOrientImage() error

Auto orient the image

func (*MagickWand) BlackThresholdImage

func (mw *MagickWand) BlackThresholdImage(threshold *PixelWand) error

This is like ThresholdImage() but forces all pixels below the threshold into black while leaving all pixels above the threshold unchanged.

func (*MagickWand) BlueShiftImage

func (mw *MagickWand) BlueShiftImage(factor float64) error

Mutes the colors of the image to simulate a scene at nighttime in the moonlight.

func (*MagickWand) BlurImage

func (mw *MagickWand) BlurImage(radius, sigma float64) error

Blurs an image. We convolve the image with a gaussian operator of the given radius and standard deviation (sigma). For reasonable results, the radius should be larger than sigma. Use a radius of 0 and BlurImage() selects a suitable radius for you.

radius: the radius of the, in pixels, not counting the center pixel.

sigma: the standard deviation of the, in pixels

func (*MagickWand) BorderImage

func (mw *MagickWand) BorderImage(borderColor *PixelWand, width, height uint,
	compose CompositeOperator) error

Surrounds the image with a border of the color defined by the bordercolor pixel wand.

func (*MagickWand) BrightnessContrastImage

func (mw *MagickWand) BrightnessContrastImage(brightness, contrast float64) error

Use this to change the brightness and/or contrast of an image. It converts the brightness and contrast.

brighness: the brightness percent (-100 .. 100)

contrast: the brightness percent (-100 .. 100)

func (*MagickWand) CharcoalImage

func (mw *MagickWand) CharcoalImage(radius, sigma float64) error

Simulates a charcoal drawing

radius: the radius of the Gaussian, in pixels, not counting the center pixel

sigma: the standard deviation of the Gaussian, in pixels

func (*MagickWand) ChopImage

func (mw *MagickWand) ChopImage(width, height uint, x, y int) error

Removes a region of an image and collapses the image to occupy the removed portion.

width, height: the region width and height

x, y: the region x and y offsets

func (*MagickWand) ClampImage

func (mw *MagickWand) ClampImage() error

Restricts the color range from 0 to the quantum depth

func (*MagickWand) Clear

func (mw *MagickWand) Clear()

Clear resources associated with the wand, leaving the wand blank, and ready to be used for a new set of images.

func (*MagickWand) ClipImage

func (mw *MagickWand) ClipImage() error

Clips along the first path from the 8BIM profile, if present

func (*MagickWand) ClipImagePath

func (mw *MagickWand) ClipImagePath(pathname string, inside bool) error

Clips along the named paths from the 8BOM profile, if present. Later operations take effect inside the path. Id may be a number if preceded with #, to work on a numbered path, e.g. "#1" to use the first path. pathname: name of clipping path resource. If name is preceded by #, use clipping path numbered by name.

inside: if true, later operations take effect inside clipping path. Otherwise later operations take effect outside clipping path.

func (*MagickWand) Clone

func (mw *MagickWand) Clone() *MagickWand

Makes an exact copy of the MagickWand object

func (*MagickWand) ClutImage

func (mw *MagickWand) ClutImage(clut *MagickWand, interp PixelInterpolateMethod) error

Replaces colors in the image from a color lookup table

func (*MagickWand) CoalesceImages

func (mw *MagickWand) CoalesceImages() *MagickWand

Composites a set of images while respecting any page offsets and disposal methods. GIF, MIFF, and MNG animation sequences typically start with an image background and each subsequent image varies in size and offset. CoalesceImages() returns a new sequence where each image in the sequence is the same size as the first and composited with the next image in the sequence.

func (*MagickWand) ColorDecisionListImage

func (mw *MagickWand) ColorDecisionListImage(cccXML string) error

Accepts a lightweight Color Correction Collection (CCC) file which solely contains one or more color corrections and applies the color correction to the image. Here is a sample CCC file content:

<colorcorrectioncollection xmlns="urn:ASC:CDL:v1.2">
  <colorcorrection id="cc03345">
    <sopnode>
      <slope> 0.9 1.2 0.5 </slope>
      <offset> 0.4 -0.5 0.6 </offset>
      <power> 1.0 0.8 1.5 </power>
    </sopnode>
    <satnode>
      <saturation> 0.85 </saturation>
    </satnode>
  </colorcorrection>
</colorcorrectioncollection>

func (*MagickWand) ColorMatrixImage

func (mw *MagickWand) ColorMatrixImage(colorMatrix *KernelInfo) error

Apply color transformation to an image. The method permits saturation changes, hue rotation, luminance to alpha, and various other effects. Although variable-sized transformation matrices can be used, typically one uses a 5x5 matrix for an RGBA image and a 6x6 for CMYKA (or RGBA with offsets). The matrix is similar to those used by Adobe Flash except offsets are in column 6 rather than 5 (in support of CMYKA images) and offsets are normalized (divide Flash offset by 255).

func (*MagickWand) ColorizeImage

func (mw *MagickWand) ColorizeImage(colorize, opacity *PixelWand) error

Blends the fill color with each pixel in the image

func (*MagickWand) CombineImages

func (mw *MagickWand) CombineImages(cs ColorspaceType) *MagickWand

Combines one or more images into a single image. The grayscale value of the pixels of each image in the sequence is assigned in order to the specified channels of the combined image. The typical ordering would be image 1 => Red, 2 => Green, 3 => Blue, etc.

func (*MagickWand) CommentImage

func (mw *MagickWand) CommentImage(comment string) error

Adds a comment to your image

func (*MagickWand) CompareImages

func (mw *MagickWand) CompareImages(reference *MagickWand, metric MetricType) (wand *MagickWand, distortion float64)

CompareImages() compares an image to a reconstructed image and returns the specified difference image. Returns the new MagickWand and the computed distortion between the images

func (*MagickWand) CompositeImage

func (mw *MagickWand) CompositeImage(source *MagickWand,
	compose CompositeOperator, clipToSelf bool, x, y int) error

Composite one image onto another at the specified offset. source: The magick wand holding source image. compose: This operator affects how the composite is applied to the image. The default is Over.

x: the column offset of the composited image.

y: the row offset of the composited image.

func (*MagickWand) CompositeLayers

func (mw *MagickWand) CompositeLayers(source *MagickWand, compose CompositeOperator, x, y int) error

Composite the images in the source wand over the images in the destination wand in sequence, starting with the current image in both lists. Each layer from the two image lists are composted together until the end of one of the image lists is reached. The offset of each composition is also adjusted to match the virtual canvas offsets of each layer. As such the given offset is relative to the virtual canvas, and not the actual image. Composition uses given x and y offsets, as the 'origin' location of the source images virtual canvas (not the real image) allowing you to compose a list of 'layer images' into the destination images. This makes it well suitable for directly composing 'Clears Frame Animations' or 'Coaleased Animations' onto a static or other 'Coaleased Animation' destination image list. GIF disposal handling is not looked at. Special case: If one of the image sequences is the last image (just a single image remaining), that image is repeatally composed with all the images in the other image list. Either the source or destination lists may be the single image, for this situation. In the case of a single destination image (or last image given), that image will ve cloned to match the number of images remaining in the source image list. This is equivelent to the "-layer Composite" Shell API operator. source: the wand holding the source images

compose, x, y: composition arguments

func (*MagickWand) ConstituteImage

func (mw *MagickWand) ConstituteImage(cols, rows uint, pmap string, stype StorageType, pixels interface{}) error

Adds an image to the wand comprised of the pixel data you supply. The pixel data must be in scanline order top-to-bottom.

stype: Define the data type of the pixels. Float and double types are expected to be normalized [0..1] otherwise [0..QuantumRange].

pmap: This string reflects the expected ordering of the pixel array. It can be any combination or order of R = red, G = green, B = blue, A = alpha (0 is transparent), O = opacity (0 is opaque), C = cyan, Y = yellow, M = magenta, K = black, I = intensity (for grayscale), P = pad.

pixels: This array of values contain the pixel components as defined by the type.

func (*MagickWand) ContrastImage

func (mw *MagickWand) ContrastImage(sharpen bool) error

Enhances the intensity differences between the lighter and darker elements of the image. Set sharpen to a value other than 0 to increase the image contrast otherwise the contrast is reduced.

sharpen: increase or decrease image contrast

func (*MagickWand) ContrastStretchImage

func (mw *MagickWand) ContrastStretchImage(blackPoint, whitePoint float64) error

Enhances the contrast of a color image by adjusting the pixels color to span the entire range of colors available. You can also reduce the influence of a particular channel with a gamma value of 0.

func (*MagickWand) ConvolveImage

func (mw *MagickWand) ConvolveImage(kernel *KernelInfo) error

Applies a custom convolution kernel to the image.

kernel: KernelInfo

func (*MagickWand) CropImage

func (mw *MagickWand) CropImage(width, height uint, x, y int) error

Extracts a region of the image

func (*MagickWand) CycleColormapImage

func (mw *MagickWand) CycleColormapImage(displace int) error

Displaces an Image's colormap by a given number of positions. If you cycle the colormap a number of times you can produce a psychodelic effect.

func (*MagickWand) DecipherImage

func (mw *MagickWand) DecipherImage(passphrase string) error

Converts cipher pixels to plain pixels

func (*MagickWand) DeconstructImages

func (mw *MagickWand) DeconstructImages() *MagickWand

Compares each image with the next in a sequence and returns the maximum bouding region of any pixel differences it discovers.

func (*MagickWand) DecreaseCount added in v1.1.0

func (mw *MagickWand) DecreaseCount()

Decrease MagickWand ref counter and set according "can be terminated status"

func (*MagickWand) DeleteImageArtifact

func (mw *MagickWand) DeleteImageArtifact(artifact string) error

This method deletes a wand artifact

func (*MagickWand) DeleteImageProperty

func (mw *MagickWand) DeleteImageProperty(property string) error

This method deletes a image property

func (*MagickWand) DeleteOption

func (mw *MagickWand) DeleteOption(option string) error

This method deletes a wand option

func (*MagickWand) DeskewImage

func (mw *MagickWand) DeskewImage(threshold float64) error

Removes skew from the image. Skew is an artifact that occurs in scanned images because of the camera being misaligned, imperfections in the scanning or surface, or simply because the paper was not placed completely flat when scanned. threshold: separate background from foreground

func (*MagickWand) DespeckleImage

func (mw *MagickWand) DespeckleImage() error

Reduces the speckle noise in an image while perserving the edges of the original image.

func (*MagickWand) Destroy

func (mw *MagickWand) Destroy()

Deallocates memory associated with an MagickWand

func (*MagickWand) DestroyImage

func (mw *MagickWand) DestroyImage(img *Image) *Image

Dereferences an image, deallocating memory associated with the image if the reference count becomes zero.

func (*MagickWand) DisplayImage

func (mw *MagickWand) DisplayImage(server string) error

Displays and image

func (*MagickWand) DisplayImages

func (mw *MagickWand) DisplayImages(server string) error

Displays and image or image sequence

func (*MagickWand) DistortImage

func (mw *MagickWand) DistortImage(method DistortImageMethod, args []float64, bestfit bool) error

DistortImage() distorts an image using various distortion methods, by mapping color lookups of the source image to a new destination image usally of the same size as the source image, unless 'bestfit' is set to true. If 'bestfit' is enabled, and distortion allows it, the destination image is adjusted to ensure the whole source 'image' will just fit within the final destination image, which will be sized and offset accordingly. Also in many cases the virtual offset of the source image will be taken into account in the mapping.

method: the method of image distortion. ArcDistortion always ignores the source image offset, and always 'bestfit' the destination image with the top left corner offset relative to the polar mapping center. Bilinear has no simple inverse mapping so it does not allow 'bestfit' style of image distortion. Affine, Perspective, and Bilinear, do least squares fitting of the distortion when more than the minimum number of control point pairs are provided. Perspective, and Bilinear, falls back to a Affine distortion when less that 4 control point pairs are provided. While Affine distortions let you use any number of control point pairs, that is Zero pairs is a no-Op (viewport only) distortion, one pair is a translation and two pairs of control points do a scale-rotate-translate, without any shearing.

args: the arguments for this distortion method.

bestfit: Attempt to resize destination to fit distorted source.

func (*MagickWand) DrawImage

func (mw *MagickWand) DrawImage(drawingWand *DrawingWand) error

Renders the drawing wand on the current image

func (*MagickWand) EdgeImage

func (mw *MagickWand) EdgeImage(radius float64) error

Enhance edges within the image with a convolution filter of the given radius. Use a radius of 0 and Edge() selects a suitable radius for you.

radius: the radius of the pixel neighborhood

func (*MagickWand) EmbossImage

func (mw *MagickWand) EmbossImage(radius, sigma float64) error

Returns a grayscale image with a three-dimensional effect. We convolve the image with a Gaussian operator of the given radius and standard deviation (sigma). For reasonable results, radius should be larger than sigma. Use a radius of 0 and Emboss() selects a suitable radius for you.

radius: the radius of the Gaussian, in pixels, not counting the center pixel

sigma: the standard deviation of the Gaussian, in pixels

func (*MagickWand) EncipherImage

func (mw *MagickWand) EncipherImage(passphrase string) error

Converts plain pixels to cipher pixels

func (*MagickWand) EnhanceImage

func (mw *MagickWand) EnhanceImage() error

Applies a digital filter that improves the quality of a noisy image

func (*MagickWand) EqualizeImage

func (mw *MagickWand) EqualizeImage() error

Equalizes the image histogram.

func (*MagickWand) EvaluateImage

func (mw *MagickWand) EvaluateImage(op EvaluateOperator, value float64) error

Applys an arithmetic, relational, or logical expression to an image. Use these operators to lighten or darken an image, to increase or decrease contrast in an image, or to produce the "negative" of an image.

func (*MagickWand) EvaluateImages

func (mw *MagickWand) EvaluateImages(op EvaluateOperator) error

Applys an arithmetic, relational, or logical expression to an image. Use these operators to lighten or darken an image, to increase or decrease contrast in an image, or to produce the "negative" of an image.

func (*MagickWand) ExportImagePixels

func (mw *MagickWand) ExportImagePixels(x, y int, cols, rows uint,
	pmap string, stype StorageType) (interface{}, error)

Extracts pixel data from an image and returns it to you.

x, y, cols, rows: These values define the perimeter of a region of pixels you want to extract.

map: This string reflects the expected ordering of the pixel array. It can be any combination or order of R = red, G = green, B = blue, A = alpha (0 is transparent), O = opacity (0 is opaque), C = cyan, Y = yellow, M = magenta, K = black, I = intensity (for grayscale), P = pad.

stype: Define the data type of the pixels. Float and double types are expected to be normalized [0..1] otherwise [0..QuantumRange]. Choose from these types: CharPixel, DoublePixel, FloatPixel, IntegerPixel, LongPixel, QuantumPixel, or ShortPixel.

StorageType defines the underlying slice type of the returned interface{}:

PIXEL_CHAR     => []byte
PIXEL_DOUBLE   => []float64
PIXEL_FLOAT    => []float32
PIXEL_SHORT    => []int16
PIXEL_LONG     => []int32
PIXEL_LONGLONG => []int64
PIXEL_QUANTUM  => []int64

Example:

val, err := wand.ExportImagePixels(0, 0, 512, 512, "RGB", PIXEL_FLOAT)
if err != nil {
    panic(err.Error())
}
floatPixels := val.([]float32)

func (*MagickWand) ExtentImage

func (mw *MagickWand) ExtentImage(width, height uint, x, y int) error

Extends the image as defined by the geometry, gravitt, and wand background color. Set the (x,y) offset of the geometry to move the original wand relative to the extended wand.

width: the region width.

height: the region height.

x: the region x offset.

y: the region y offset.

func (*MagickWand) FlipImage

func (mw *MagickWand) FlipImage() error

Creates a vertical mirror image by reflecting the pixels around the central x-axis.

func (*MagickWand) FloodfillPaintImage

func (mw *MagickWand) FloodfillPaintImage(fill *PixelWand, fuzz float64, borderColor *PixelWand, x, y int, invert bool) error

Changes the color value of any pixel that matches target and is an immediate neighbor. If the method FillToBorderMethod is specified, the color value is changed for any neighbor pixel that does not match the bordercolor member of image.

fill: the floodfill color pixel wand.

fuzz: By default target must match a particular pixel color exactly.

However, in many cases two colors may differ by a small amount. The fuzz member of image defines how much tolerance is acceptable to consider two colors as the same. For example, set fuzz to 10 and the color red at intensities of 100 and 102 respectively are now interpreted as the same color for the purposes of the floodfill.

bordercolor: the border color pixel wand.

x, y: the starting location of the operation.

invert: paint any pixel that does not match the target color.

func (*MagickWand) FlopImage

func (mw *MagickWand) FlopImage() error

Creates a horizontal mirror image by reflecting the pixels around the central y-axis.

func (*MagickWand) ForwardFourierTransformImage

func (mw *MagickWand) ForwardFourierTransformImage(magnitude bool) error

Implements the discrete Fourier transform (DFT) of the image either as a magnitude/phase or real/imaginary image pair.

magnitude: if true, return as magnitude/phase pair otherwise a

real/imaginary image pair.

func (*MagickWand) FrameImage

func (mw *MagickWand) FrameImage(matteColor *PixelWand, width, height uint,
	innerBevel, outerBevel int, compose CompositeOperator) error

Adds a simulated three-dimensional border around the image. The width and height specify the border width of the vertical and horizontal sides of the frame. The inner and outer bevels indicate the width of the inner and outer shadows of the frame.

matteColor: the frame color pixel wand.

width: the border width.

height: the border height.

innerBevel: the inner bevel width.

outerBevel: the outer bevel width.

compose: the composite operator.

func (*MagickWand) FunctionImage

func (mw *MagickWand) FunctionImage(function MagickFunction, args []float64) error

Applys an arithmetic, relational, or logical expression to an image. Use these operators to lighten or darken an image, to increase or decrease contrast in an image, or to produce the "negative" of an image.

func (*MagickWand) FxImage

func (mw *MagickWand) FxImage(expression string) (fxmw *MagickWand, err error)

Evaluate expression for each pixel in the image.

func (*MagickWand) GammaImage

func (mw *MagickWand) GammaImage(gamma float64) error

Gamma-corrects an image. The same image viewed on different devices will have perceptual differences in the way the image's intensities are represented on the screen. Specify individual gamma levels for the red, green, and blue channels, or adjust all three with the gamma parameter. Values typically range from 0.8 to 2.3. You can also reduce the influence of a particular channel with a gamma value of 0.

func (*MagickWand) GaussianBlurImage

func (mw *MagickWand) GaussianBlurImage(radius, sigma float64) error

Blurs an image. We convolve the image with a Gaussian operator of the given radius and standard deviation (sigma). For reasonable results, the radius should be larger than sigma. Use a radius of 0 and GaussianBlurImage() selects a suitable radius for you.

radius: the radius of the Gaussian, in pixels, not counting the center pixel.

sigma: the standard deviation of the Gaussian, in pixels.

func (*MagickWand) GetAntialias

func (mw *MagickWand) GetAntialias() bool

Returns the antialias property associated with the wand

func (*MagickWand) GetBackgroundColor

func (mw *MagickWand) GetBackgroundColor() *PixelWand

Returns the wand background color

func (*MagickWand) GetColorspace

func (mw *MagickWand) GetColorspace() ColorspaceType

Returns the wand colorspace type

func (*MagickWand) GetCompression

func (mw *MagickWand) GetCompression() CompressionType

Gets the wand compression type.

func (*MagickWand) GetCompressionQuality

func (mw *MagickWand) GetCompressionQuality() uint

Gets the wand compression quality.

func (*MagickWand) GetFilename

func (mw *MagickWand) GetFilename() string

Returns the filename associated with an image sequence.

func (*MagickWand) GetFont

func (mw *MagickWand) GetFont() string

Returns the font associated with the MagickWand.

func (*MagickWand) GetFormat

func (mw *MagickWand) GetFormat() string

Returns the format of the magick wand.

func (*MagickWand) GetGravity

func (mw *MagickWand) GetGravity() GravityType

Gets the wand gravity.

func (*MagickWand) GetImage

func (mw *MagickWand) GetImage() *MagickWand

Gets the image at the current image index.

func (*MagickWand) GetImageAlphaChannel

func (mw *MagickWand) GetImageAlphaChannel() bool

GetImageAlphaChannel returns MagickFalse if the image alpha channel is not activated. That is, the image is RGB rather than RGBA or CMYK rather than CMYKA.

func (*MagickWand) GetImageArtifact

func (mw *MagickWand) GetImageArtifact(artifact string) string

Returns a value associated with the specified artifact.

func (*MagickWand) GetImageArtifacts

func (mw *MagickWand) GetImageArtifacts(pattern string) (artifacts []string)

Returns all the artifact names that match the specified pattern associated with a wand. Use GetImageProperty() to return the value of a particular artifact.

func (*MagickWand) GetImageBackgroundColor

func (mw *MagickWand) GetImageBackgroundColor() (bgColor *PixelWand, err error)

Returns the image background color.

func (*MagickWand) GetImageBlob

func (mw *MagickWand) GetImageBlob() []byte

Implements direct to memory image formats. It returns the image as a blob (a formatted "file" in memory) and its length, starting from the current position in the image sequence. Use SetImageFormat() to set the format to write to the blob (GIF, JPEG, PNG, etc.). Utilize ResetIterator() to ensure the write is from the beginning of the image sequence.

func (*MagickWand) GetImageBluePrimary

func (mw *MagickWand) GetImageBluePrimary() (x, y, z float64, err error)

Returns the chromaticy blue primary point for the image.

x: the chromaticity blue primary x-point.

y: the chromaticity blue primary y-point.

z: the chromaticity blue primary z-point.

func (*MagickWand) GetImageBorderColor

func (mw *MagickWand) GetImageBorderColor() (borderColor *PixelWand, err error)

Returns the image border color.

func (*MagickWand) GetImageColormapColor

func (mw *MagickWand) GetImageColormapColor(index uint) (color *PixelWand, err error)

Returns the color of the specified colormap index.

func (*MagickWand) GetImageColors

func (mw *MagickWand) GetImageColors() uint

Gets the number of unique colors in the image.

func (*MagickWand) GetImageColorspace

func (mw *MagickWand) GetImageColorspace() ColorspaceType

Gets the image colorspace.

func (*MagickWand) GetImageCompose

func (mw *MagickWand) GetImageCompose() CompositeOperator

Returns the composite operator associated with the image.

func (*MagickWand) GetImageCompression

func (mw *MagickWand) GetImageCompression() CompressionType

Gets the image compression.

func (*MagickWand) GetImageCompressionQuality

func (mw *MagickWand) GetImageCompressionQuality() uint

Gets the image compression quality.

func (*MagickWand) GetImageDelay

func (mw *MagickWand) GetImageDelay() uint

Gets the image delay.

func (*MagickWand) GetImageDepth

func (mw *MagickWand) GetImageDepth() uint

Gets the image depth.

func (*MagickWand) GetImageDispose

func (mw *MagickWand) GetImageDispose() DisposeType

Gets the image disposal method.

func (*MagickWand) GetImageDistortion

func (mw *MagickWand) GetImageDistortion(reference *MagickWand, metric MetricType) (distortion float64, err error)

Compares an image to a reconstructed image and returns the specified distortion metric.

func (*MagickWand) GetImageEndian

func (mw *MagickWand) GetImageEndian() EndianType

Gets the image endian.

func (*MagickWand) GetImageFilename

func (mw *MagickWand) GetImageFilename() string

Returns the filename of a particular image in a sequence.

func (*MagickWand) GetImageFormat

func (mw *MagickWand) GetImageFormat() string

Returns the format of a particular image in a sequence.

func (*MagickWand) GetImageFromMagickWand

func (mw *MagickWand) GetImageFromMagickWand() *Image

Returns the current image from the magick wand

func (*MagickWand) GetImageFuzz

func (mw *MagickWand) GetImageFuzz() float64

Gets the image fuzz.

func (*MagickWand) GetImageGamma

func (mw *MagickWand) GetImageGamma() float64

Gets the image gamma.

func (*MagickWand) GetImageGravity

func (mw *MagickWand) GetImageGravity() GravityType

Gets the image gravity.

func (*MagickWand) GetImageGreenPrimary

func (mw *MagickWand) GetImageGreenPrimary() (x, y, z float64, err error)

Returns the chromaticy green primary point.

x: the chromaticity green primary x-point.

y: the chromaticity green primary y-point.

z: the chromaticity green primary z-point.

func (*MagickWand) GetImageHeight

func (mw *MagickWand) GetImageHeight() uint

Returns the image height.

func (*MagickWand) GetImageHistogram

func (mw *MagickWand) GetImageHistogram() (numberColors uint, pws []*PixelWand)

Returns the image histogram as an array of PixelWand wands.

numberColors: the number of unique colors in the image and the number of pixel wands returned.

func (*MagickWand) GetImageInterlaceScheme

func (mw *MagickWand) GetImageInterlaceScheme() InterlaceType

Gets the image interlace scheme.

func (*MagickWand) GetImageInterpolateMethod

func (mw *MagickWand) GetImageInterpolateMethod() PixelInterpolateMethod

Returns the interpolation method for the sepcified image.

func (*MagickWand) GetImageIterations

func (mw *MagickWand) GetImageIterations() uint

Gets the image iterations.

func (*MagickWand) GetImageLength

func (mw *MagickWand) GetImageLength() (length uint, err error)

Returns the image length in bytes.

func (*MagickWand) GetImageOrientation

func (mw *MagickWand) GetImageOrientation() OrientationType

Returns the image orientation.

func (*MagickWand) GetImagePage

func (mw *MagickWand) GetImagePage() (w, h uint, x, y int, err error)

Returns the page geometry associated with the image.

w, h: the page width and height

x, h: the page x-offset and y-offset.

func (*MagickWand) GetImagePixelColor

func (mw *MagickWand) GetImagePixelColor(x, y int) (color *PixelWand, err error)

Returns the color of the specified pixel.

func (*MagickWand) GetImageProfile

func (mw *MagickWand) GetImageProfile(name string) string

Returns the named image profile.

name: Name of profile to return: ICC, IPTC, or generic profile.

func (*MagickWand) GetImageProfiles

func (mw *MagickWand) GetImageProfiles(pattern string) (profiles []string)

Returns all the profile names that match the specified pattern associated with a wand. Use GetImageProfile() to return the value of a particular property.

func (*MagickWand) GetImageProperties

func (mw *MagickWand) GetImageProperties(pattern string) (properties []string)

Returns all the property names that match the specified pattern associated with a wand. Use GetImageProperty() to return the value of a particular property.

func (*MagickWand) GetImageProperty

func (mw *MagickWand) GetImageProperty(property string) string

Returns a value associated with the specified property.

func (*MagickWand) GetImageRedPrimary

func (mw *MagickWand) GetImageRedPrimary() (x, y, z float64, err error)

Returns the chromaticy red primary point.

x, y, z: the chromaticity red primary x/y/z-point.

func (*MagickWand) GetImageRegion

func (mw *MagickWand) GetImageRegion(width uint, height uint, x int, y int) *MagickWand

Extracts a region of the image and returns it as a a new wand.

func (*MagickWand) GetImageRenderingIntent

func (mw *MagickWand) GetImageRenderingIntent() RenderingIntent

Gets the image rendering intent.

func (*MagickWand) GetImageResolution

func (mw *MagickWand) GetImageResolution() (x, y float64, err error)

Gets the image X and Y resolution.

func (*MagickWand) GetImageScene

func (mw *MagickWand) GetImageScene() uint

Gets the image scene.

func (*MagickWand) GetImageSignature

func (mw *MagickWand) GetImageSignature() string

Generates an SHA-256 message digest for the image pixel stream.

func (*MagickWand) GetImageTicksPerSecond

func (mw *MagickWand) GetImageTicksPerSecond() uint

Gets the image ticks-per-second.

func (*MagickWand) GetImageTotalInkDensity

func (mw *MagickWand) GetImageTotalInkDensity() float64

Gets the image total ink density.

func (*MagickWand) GetImageType

func (mw *MagickWand) GetImageType() ImageType

Gets the potential image type To ensure the image type matches its potential, use SetImageType(): wand.SetImageType(wand.GetImageType())

func (*MagickWand) GetImageUnits

func (mw *MagickWand) GetImageUnits() ResolutionType

Gets the image units of resolution.

func (*MagickWand) GetImageVirtualPixelMethod

func (mw *MagickWand) GetImageVirtualPixelMethod() VirtualPixelMethod

Returns the virtual pixel method for the specified image.

func (*MagickWand) GetImageWhitePoint

func (mw *MagickWand) GetImageWhitePoint() (x, y, z float64, err error)

Returns the chromaticy white point.

x, y, z: the chromaticity white x/y-point.

func (*MagickWand) GetImageWidth

func (mw *MagickWand) GetImageWidth() uint

Returns the image width.

func (*MagickWand) GetImagesBlob

func (mw *MagickWand) GetImagesBlob() []byte

Implements direct to memory image formats. It returns the image sequence as a blob and its length. The format of the image determines the format of the returned blob (GIF, JPEG, PNG, etc.). To return a different image format, use SetImageFormat(). Note, some image formats do not permit multiple images to the same image stream (e.g. JPEG). in this instance, just the first image of the sequence is returned as a blob.

func (*MagickWand) GetInterlaceScheme

func (mw *MagickWand) GetInterlaceScheme() InterlaceType

Gets the wand interlace scheme.

func (*MagickWand) GetInterpolateMethod

func (mw *MagickWand) GetInterpolateMethod() PixelInterpolateMethod

Gets the wand compression.

func (*MagickWand) GetIteratorIndex

func (mw *MagickWand) GetIteratorIndex() uint

Returns the position of the iterator in the image list

func (*MagickWand) GetLastError

func (mw *MagickWand) GetLastError() error

Returns the kind, reason and description of any error that occurs when using other methods in this API

func (*MagickWand) GetNumberImages

func (mw *MagickWand) GetNumberImages() uint

Returns the number of images associated with a magick wand.

func (*MagickWand) GetOption

func (mw *MagickWand) GetOption(key string) string

Returns a value associated with a wand and the specified key.

func (*MagickWand) GetOptions

func (mw *MagickWand) GetOptions(pattern string) (options []string)

Returns all the option names that match the specified pattern associated with a wand. Use GetOption() to return the value of a particular option.

func (*MagickWand) GetOrientation

func (mw *MagickWand) GetOrientation() OrientationType

Gets the wand orientation type.

func (*MagickWand) GetPage

func (mw *MagickWand) GetPage() (width, height uint, x, y int, err error)

Returns the page geometry associated with the magick wand.

func (*MagickWand) GetPointsize

func (mw *MagickWand) GetPointsize() float64

Returns the font pointsize associated with the MagickWand.

func (*MagickWand) GetResolution

func (mw *MagickWand) GetResolution() (x, y float64, err error)

Gets the image X and Y resolution.

func (*MagickWand) GetSamplingFactors

func (mw *MagickWand) GetSamplingFactors() (factors []float64)

Gets the horizontal and vertical sampling factor.

func (*MagickWand) GetSize

func (mw *MagickWand) GetSize() (cols, rows uint, err error)

Returns the size associated with the magick wand.

func (*MagickWand) GetSizeOffset

func (mw *MagickWand) GetSizeOffset() (offset int, err error)

Returns the size offset associated with the magick wand.

func (*MagickWand) GetType

func (mw *MagickWand) GetType() ImageType

Returns the wand type.

func (*MagickWand) HaldClutImage

func (mw *MagickWand) HaldClutImage(hald *MagickWand) error

Replaces colors in the image from a Hald color lookup table. A Hald color lookup table is a 3-dimensional color cube mapped to 2 dimensions. Create it with the HALD coder. You can apply any color transformation to the Hald image and then use this method to apply the transform to the image.

func (*MagickWand) HasNextImage

func (mw *MagickWand) HasNextImage() bool

Returns true if the wand has more images when traversing the list in the forward direction

func (*MagickWand) HasPreviousImage

func (mw *MagickWand) HasPreviousImage() bool

Returns true if the wand has more images when traversing the list in the reverse direction

func (*MagickWand) IdentifyImage

func (mw *MagickWand) IdentifyImage() string

Identifies an image by printing its attributes to the file. Attributes include the image width, height, size, and others.

func (*MagickWand) ImplodeImage

func (mw *MagickWand) ImplodeImage(radius float64, method PixelInterpolateMethod) error

Creates a new image that is a copy of an existing one with the image pixels "implode" by the specified percentage.

radius: Define the extent of the implosion.

method: the pixel interpolation method.

func (*MagickWand) ImportImagePixels

func (mw *MagickWand) ImportImagePixels(x, y int, cols, rows uint, pmap string,
	stype StorageType, pixels interface{}) error

Accepts pixel data and stores it in the image at the location you specify. The pixel data can be either byte, int16, int32, int64, float32, or float64 in the order specified by map. Suppose your want to upload the first scanline of a 640x480 image from character data in red-green-blue order:

wand.ImportImagePixels(0, 0, 640, 1, "RGB", PIXEL_CHAR, pixels)

x, y, cols, rows: These values define the perimeter of a region of pixels you want to define.

pmap: This string reflects the expected ordering of the pixel array. It can be any combination or order of R = red, G = green, B = blue, A = alpha (0 is transparent), O = opacity (0 is opaque), C = cyan, Y = yellow, M = magenta, K = black, I = intensity (for grayscale), P = pad.

stype: Define the data type of the pixels. Float and double types are expected to be normalized [0..1] otherwise [0..QuantumRange]. Choose from these types:

PIXEL_CHAR
PIXEL_SHORT
PIXEL_INTEGER
PIXEL_LONG
PIXEL_FLOAT
PIXEL_DOUBLE

pixels: This slice of values contain the pixel components as defined by map and type. You must pre-allocate this slice where the expected length varies depending on the values of width, height, map, and type.

func (*MagickWand) IncreaseCount added in v1.1.0

func (mw *MagickWand) IncreaseCount()

Increase MagickWand ref counter and set according "can`t be terminated status"

func (*MagickWand) InverseFourierTransformImage

func (mw *MagickWand) InverseFourierTransformImage(phaseWand *MagickWand, magnitude bool) error

Implements the inverse discrete Fourier transform (DFT) of the image either as a magnitude/phase or real/imaginary image pair.

magnitudeWand: the magnitude or real wand.

phaseWand: the phase or imaginary wand.

magnitude: if true, return as magnitude/phase pair otherwise a real/imaginary image pair.

func (*MagickWand) IsVerified

func (mw *MagickWand) IsVerified() bool

Returns true if the wand is a verified magick wand

func (*MagickWand) LabelImage

func (mw *MagickWand) LabelImage(label string) error

Adds a label to your image.

func (*MagickWand) LevelImage

func (mw *MagickWand) LevelImage(blackPoint, gamma, whitePoint float64) error

Adjusts the levels of an image by scaling the colors falling between specified white and black points to the full available quantum range. The parameters provided represent the black, mid, and white points. The black point specifies the darkest color in the image. Colors darker than the black point are set to zero. Mid point specifies a gamma correction to apply to the image. White point specifies the lightest color in the image. Colors brighter than the white point are set to the maximum quantum value.

func (*MagickWand) LinearStretchImage

func (mw *MagickWand) LinearStretchImage(blackPoint, whitePoint float64) error

Stretches with saturation the image intensity. You can also reduce the influence of a particular channel with a gamma value of 0.

func (*MagickWand) LiquidRescaleImage

func (mw *MagickWand) LiquidRescaleImage(cols, rows uint, deltaX, rigidity float64) error

Rescales image with seam carving.

cols, rows: the number of cols and rows in the scaled image.

deltaX: maximum seam transversal step (0 means straight seams).

rigidity: introduce a bias for non-straight seams (typically 0).

func (*MagickWand) MagnifyImage

func (mw *MagickWand) MagnifyImage() error

This is a convenience method that scales an image proportionally to twice its original size.

func (*MagickWand) MergeImageLayers

func (mw *MagickWand) MergeImageLayers(method ImageLayerMethod) *MagickWand

Composes all the image layers from the current given image onward to produce a single image of the merged layers. The inital canvas's size depends on the given ImageLayerMethod, and is initialized using the first images background color. The images are then compositied onto that image in sequence using the given composition that has been assigned to each individual image.

method: the method of selecting the size of the initial canvas. MergeLayer: Merge all layers onto a canvas just large enough to hold all the actual images. The virtual canvas of the first image is preserved but otherwise ignored. FlattenLayer: Use the virtual canvas size of first image. Images which fall outside this canvas is clipped. This can be used to 'fill out' a given virtual canvas. MosaicLayer: Start with the virtual canvas of the first image, enlarging left and right edges to contain all images. Images with negative offsets will be clipped.

func (*MagickWand) MinifyImage

func (mw *MagickWand) MinifyImage() error

This is a convenience method that scales an image proportionally to one-half its original size

func (*MagickWand) ModulateImage

func (mw *MagickWand) ModulateImage(brightness, saturation, hue float64) error

Lets you control the brightness, saturation, and hue of an image. Hue is the percentage of absolute rotation from the current position. For example 50 results in a counter-clockwise rotation of 90 degrees, 150 results in a clockwise rotation of 90 degrees, with 0 and 200 both resulting in a rotation of 180 degrees. To increase the color brightness by 20 and decrease the color saturation by 10 and leave the hue unchanged, use: 120, 90, 100.

brightness: the percent change in brighness.

saturation: the percent change in saturation.

hue: the percent change in hue.

func (*MagickWand) MontageImage

func (mw *MagickWand) MontageImage(dw *DrawingWand, tileGeo string, thumbGeo string, mode MontageMode, frame string) *MagickWand

Creates a composite image by combining several separate images. The images are tiled on the composite image with the name of the image optionally appearing just below the individual tile.

dw: the drawing wand. The font name, size, and color are obtained from this wand.

tileGeo: the number of tiles per row and page (e.g. 6x4+0+0).

thumbGeo: Preferred image size and border size of each thumbnail (e.g. 120x120+4+3>).

mode: Thumbnail framing mode: Frame, Unframe, or Concatenate.

frame: Surround the image with an ornamental border (e.g. 15x15+3+3). The frame color is that of the thumbnail's matte color.

func (*MagickWand) MorphImages

func (mw *MagickWand) MorphImages(numFrames uint) *MagickWand

Method morphs a set of images. Both the image pixels and size are linearly interpolated to give the appearance of a meta-morphosis from one image to the next.

numFrames: the number of in-between images to generate.

func (*MagickWand) MorphologyImage

func (mw *MagickWand) MorphologyImage(method MorphologyMethod, iterations int, kernel *KernelInfo) error

Applies a user supplied kernel to the image according to the given mophology method.

channel: the image channel(s).

method: the morphology method to be applied.

iterations: apply the operation this many times (or no change). A value of -1 means loop until no change found. How this is applied may depend on the morphology method. Typically this is a value of 1.

kernel: An array of doubles representing the morphology kernel.

func (*MagickWand) MotionBlurImage

func (mw *MagickWand) MotionBlurImage(radius, sigma, angle float64) error

Simulates motion blur. We convolve the image with a Gaussian operator of the given radius and standard deviation (sigma). For reasonable results, radius should be larger than sigma. Use a radius of 0 and MotionBlurImage() selects a suitable radius for you. Angle gives the angle of the blurring motion.

radius: the radius of the Gaussian, in pixels, not counting the center pixel.

sigma: the standard deviation of the Gaussian, in pixels.

angle: apply the effect along this angle.

func (*MagickWand) NegateImage

func (mw *MagickWand) NegateImage(gray bool) error

Negates the colors in the reference image. The Grayscale option means that only grayscale values within the image are negated. You can also reduce the influence of a particular channel with a gamma value of 0.

gray: If true, only negate grayscale pixels within the image.

func (*MagickWand) NewImage

func (mw *MagickWand) NewImage(cols uint, rows uint, background *PixelWand) error

Adds a blank image canvas of the specified size and background color to the wand.

func (*MagickWand) NewPixelIterator

func (mw *MagickWand) NewPixelIterator() *PixelIterator

Returns a new pixel iterator

mw: the magick wand to iterate on

func (*MagickWand) NewPixelRegionIterator

func (mw *MagickWand) NewPixelRegionIterator(x, y int, width, height uint) *PixelIterator

Returns a new pixel iterator

mw: the magick wand to iterate on x, y, cols, rows: there values define the perimeter of a region of pixels

func (*MagickWand) NextImage

func (mw *MagickWand) NextImage() bool

Sets the next image in the wand as the current image. It is typically used after ResetIterator(), after which its first use will set the first image as the current image (unless the wand is empty). It will return false when no more images are left to be returned which happens when the wand is empty, or the current image is the last image. When the above condition (end of image list) is reached, the iterator is automaticall set so that you can start using PreviousImage() to again/ iterate over the images in the reverse direction, starting with the last image (again). You can jump to this condition immeditally using SetLastIterator().

func (*MagickWand) NormalizeImage

func (mw *MagickWand) NormalizeImage() error

Enhances the contrast of a color image by adjusting the pixels color to span the entire range of colors available. You can also reduce the influence of a particular channel with a gamma value of 0.

func (*MagickWand) OilPaintImage

func (mw *MagickWand) OilPaintImage(radius, sigma float64) error

Applies a special effect filter that simulates an oil painting. Each pixel is replaced by the most frequent color occurring in a circular region defined by radius.

radius: the radius of the circular neighborhood.

sigma: the standard deviation of the Gaussian, in pixels.

func (*MagickWand) OpaquePaintImage

func (mw *MagickWand) OpaquePaintImage(target, fill *PixelWand, fuzz float64, invert bool) error

Changes any pixel that matches color with the color defined by fill.

target: Change this target color to the fill color within the image.

fill: the fill pixel wand.

fuzz: By default target must match a particular pixel color exactly. However, in many cases two colors may differ by a small amount. The fuzz member of image defines how much tolerance is acceptable to consider two colors as the same. For example, set fuzz to 10 and the color red at intensities of 100 and 102 respectively are now interpreted as the same color for the purposes of the floodfill.

invert: paint any pixel that does not match the target color.

func (*MagickWand) OptimizeImageLayers

func (mw *MagickWand) OptimizeImageLayers() *MagickWand

Compares each image the GIF disposed forms of the previous image in the sequence. From this it attempts to select the smallest cropped image to replace each frame, while preserving the results of the animation.

func (*MagickWand) OptimizeImageTransparency

func (mw *MagickWand) OptimizeImageTransparency() error

Unsupported in ImageMagick 6.7.7 Takes a frame optimized GIF animation, and compares the overlayed pixels against the disposal image resulting from all the previous frames in the animation. Any pixel that does not change the disposal image (and thus does not effect the outcome of an overlay) is made transparent. WARNING: This modifies the current images directly, rather than generate a new image sequence.

func (*MagickWand) PingImage

func (mw *MagickWand) PingImage(filename string) error

This is like ReadImage() except the only valid information returned is the image width, height, size, and format. It is designed to efficiently obtain this information from a file without reading the entire image sequence into memory.

func (*MagickWand) PingImageBlob

func (mw *MagickWand) PingImageBlob(blob []byte) error

Pings an image or image sequence from a blob.

func (*MagickWand) PingImageFile

func (mw *MagickWand) PingImageFile(img *os.File) error

Pings an image or image sequence from an open file descriptor.

func (*MagickWand) PolaroidImage

func (mw *MagickWand) PolaroidImage(dw *DrawingWand, caption string,
	angle float64, method PixelInterpolateMethod) error

Simulates a Polaroid picture.

caption: the Polaroid caption.

angle: Apply the effect along this angle.

method: the pixel interpolation method.

func (*MagickWand) PosterizeImage

func (mw *MagickWand) PosterizeImage(levels uint, dither DitherMethod) error

Reduces the image to a limited number of color level.

levels: Number of color levels allowed in each channel. Very low values (2, 3, or 4) have the most visible effect.

dither: choose the dither method: UndefinedDitherMethod, NoDitherMethod, RiemersmaDitherMethod, or FloydSteinbergDitherMethod.

func (*MagickWand) PreviewImages

func (mw *MagickWand) PreviewImages(preview PreviewType) *MagickWand

Tiles 9 thumbnails of the specified image with an image processing operation applied at varying strengths. This helpful to quickly pin-point an appropriate parameter for an image processing operation.

func (*MagickWand) PreviousImage

func (mw *MagickWand) PreviousImage() bool

Sets the previous image in the wand as the current image. It is typically used after SetLastIterator(), after which its first use will set the last image as the current image (unless the wand is empty). It will return false when no more images are left to be returned which happens when the wand is empty, or the current image is the first image. At that point the iterator is than reset to again process images in the forward direction, again starting with the first image in list. Images added at this point are prepended. Also at that point any images added to the wand using AddImages() or ReadImages() will be prepended before the first image. In this sense the condition is not quite exactly the same as ResetIterator().

func (*MagickWand) ProfileImage

func (mw *MagickWand) ProfileImage(name string, profile []byte) error

Adds or removes a ICC, IPTC, or generic profile from an image. If the profile is empty, it is removed from the image otherwise added. Use a name of '*' and an empty profile to remove all profiles from the image.

name: Name of profile to add or remove: ICC, IPTC, or generic profile.

func (*MagickWand) QuantizeImage

func (mw *MagickWand) QuantizeImage(numColors uint, colorspace ColorspaceType,
	treedepth uint, dither DitherMethod, measureError bool) error

Analyzes the colors within a reference image and chooses a fixed number of colors to represent the image. The goal of the algorithm is to minimize the color difference between the input and output image while minimizing the processing time.

numColors: the number of colors.

colorspace: Perform color reduction in this colorspace, typically RGBColorspace.

treedepth: Normally, this integer value is zero or one. A zero or one tells Quantize to choose a optimal tree depth of Log4(number_colors). A tree of this depth generally allows the best representation of the reference image with the least amount of memory and the fastest computational speed. In some cases, such as an image with low color dispersion (a few number of colors), a value other than Log4(number_colors) is required. To expand the color tree completely, use a value of 8.

dither: choose from UndefinedDitherMethod, NoDitherMethod, RiemersmaDitherMethod, FloydSteinbergDitherMethod.

measureError: A value other than zero measures the difference between the original and quantized images. This difference is the total quantization error. The error is computed by summing over all pixels in an image the distance squared in RGB space between each reference pixel value and its quantized value.

func (*MagickWand) QuantizeImages

func (mw *MagickWand) QuantizeImages(numColors uint, colorspace ColorspaceType,
	treedepth uint, dither DitherMethod, measureError bool) error

Analyzes the colors within a sequence of images and chooses a fixed number of colors to represent the image. The goal of the algorithm is to minimize the color difference between the input and output image while minimizing the processing time.

numColors: the number of colors.

colorspace: Perform color reduction in this colorspace, typically RGBColorspace.

treedepth: Normally, this integer value is zero or one. A zero or one tells Quantize to choose a optimal tree depth of Log4(number_colors). A tree of this depth generally allows the best representation of the reference image with the least amount of memory and the fastest computational speed. In some cases, such as an image with low color dispersion (a few number of colors), a value other than Log4(number_colors) is required. To expand the color tree completely, use a value of 8.

dither: choose from these dither methods: NoDitherMethod, RiemersmaDitherMethod, or FloydSteinbergDitherMethod.

measureError: A value other than zero measures the difference between the original and quantized images. This difference is the total quantization error. The error is computed by summing over all pixels in an image the distance squared in RGB space between each reference pixel value and its quantized value.

func (*MagickWand) QueryConfigureOption

func (mw *MagickWand) QueryConfigureOption(option string) (string, error)

Returns the value associated with the specified configure option

func (*MagickWand) QueryConfigureOptions

func (mw *MagickWand) QueryConfigureOptions(pattern string) (options []string)

Returns any configure options that match the specified pattern (e.g. "*" for all). Options include NAME, VERSION, LIB_VERSION, etc

func (*MagickWand) QueryFontMetrics

func (mw *MagickWand) QueryFontMetrics(dw *DrawingWand, textLine string) *FontMetrics

Returns a FontMetrics struct

func (*MagickWand) QueryFonts

func (mw *MagickWand) QueryFonts(pattern string) (fonts []string)

Returns any font that match the specified pattern (e.g. "*" for all)

func (*MagickWand) QueryFormats

func (mw *MagickWand) QueryFormats(pattern string) (formats []string)

Returns any supported image format that match the specified pattern (e.g. "*" for all)

func (*MagickWand) QueryMultilineFontMetrics

func (mw *MagickWand) QueryMultilineFontMetrics(dw *DrawingWand, textParagraph string) *FontMetrics

Returns a FontMetrics struct related to the multiline text

func (*MagickWand) RadialBlurImage

func (mw *MagickWand) RadialBlurImage(angle float64) error

Radial blurs an image.

angle: the angle of the blur in degrees.

func (*MagickWand) RaiseImage

func (mw *MagickWand) RaiseImage(width uint, height uint, x int, y int, raise bool) error

Creates a simulated three-dimensional button-like effect by lightening and darkening the edges of the image. Members width and height of raise_info define the width of the vertical and horizontal edge of the effect. width,

height, x, y: Define the dimensions of the area to raise.

raise: A value other than zero creates a 3-D raise effect, otherwise it has a lowered effect.

func (*MagickWand) RandomThresholdImage

func (mw *MagickWand) RandomThresholdImage(low, high float64) error

Changes the value of individual pixels based on the intensity of each pixel compared to threshold. The result is a high-contrast, two color image.

low, high: Specify the high and low thresholds. These values range from 0 to QuantumRange.

func (*MagickWand) ReadImage

func (mw *MagickWand) ReadImage(filename string) error

Reads an image or image sequence. The images are inserted at the current image pointer position. Use SetFirstIterator(), SetLastIterator, or SetImageIndex() to specify the current image pointer position at the beginning of the image list, the end, or anywhere in-between respectively.

func (*MagickWand) ReadImageBlob

func (mw *MagickWand) ReadImageBlob(blob []byte) error

Reads an image or image sequence from a blob.

func (*MagickWand) ReadImageFile

func (mw *MagickWand) ReadImageFile(img *os.File) error

Reads an image or image sequence from an open file descriptor.

func (*MagickWand) RemapImage

func (mw *MagickWand) RemapImage(remap *MagickWand, method DitherMethod) error

Replaces the colors of an image with the closest color from a reference image.

method: choose from these dither methods: NoDitherMethod, RiemersmaDitherMethod, or FloydSteinbergDitherMethod.

func (*MagickWand) RemoveImage

func (mw *MagickWand) RemoveImage() error

Removes an image from the image list.

func (*MagickWand) RemoveImageProfile

func (mw *MagickWand) RemoveImageProfile(name string) []byte

Removes the named image profile and returns it.

name: name of profile to return: ICC, IPTC, or generic profile.

func (*MagickWand) ResampleImage

func (mw *MagickWand) ResampleImage(xRes, yRes float64, filter FilterType) error

Resample image to desired resolution.

xRes/yRes: the new image x/y resolution.

filter: Image filter to use.

func (*MagickWand) ResetImagePage

func (mw *MagickWand) ResetImagePage(page string) error

Resets the Wand page canvas and position. page: the relative page specification.

func (*MagickWand) ResetIterator

func (mw *MagickWand) ResetIterator()

This method resets the wand iterator. It is typically used either before iterating though images, or before calling specific methods such as AppendImages() to append all images together. Afterward you can use NextImage() to iterate over all the images in a wand container, starting with the first image. Using this before AddImages() or ReadImages() will cause new images to be inserted between the first and second image.

func (*MagickWand) ResizeImage

func (mw *MagickWand) ResizeImage(cols, rows uint, filter FilterType) error

Scales an image to the desired dimensions

cols: the number of cols in the scaled image.

rows: the number of rows in the scaled image.

filter: Image filter to use.

func (*MagickWand) RollImage

func (mw *MagickWand) RollImage(x, y int) error

Offsets an image as defined by x and y.

x: the x offset.

y: the y offset.

func (*MagickWand) RotateImage

func (mw *MagickWand) RotateImage(background *PixelWand, degrees float64) error

Rotates an image the specified number of degrees. Empty triangles left over from rotating the image are filled with the background color.

background: the background pixel wand.

degrees: the number of degrees to rotate the image.

func (*MagickWand) SampleImage

func (mw *MagickWand) SampleImage(cols, rows uint) error

Scales an image to the desired dimensions with pixel sampling. Unlike other scaling methods, this method does not introduce any additional color into the scaled image.

func (*MagickWand) ScaleImage

func (mw *MagickWand) ScaleImage(cols, rows uint) error

Scales the size of an image to the given dimensions.

func (*MagickWand) SegmentImage

func (mw *MagickWand) SegmentImage(colorspace ColorspaceType, verbose bool, clusterThreshold, smoothThreshold float64) error

Segments an image by analyzing the histograms of the color components and identifying units that are homogeneous with the fuzzy C-means technique.

verbose: set to true to print detailed information about the identified classes.

clusterThreshold: this represents the minimum number of pixels contained in a hexahedra before it can be considered valid (expressed as a percentage).

smoothThreshold: the smoothing threshold eliminates noise in the second derivative of the histogram. As the value is increased, you can expect a smoother second derivative.

func (*MagickWand) SelectiveBlurImage

func (mw *MagickWand) SelectiveBlurImage(radius, sigma, threshold float64) error

Selectively blur an image within a contrast threshold. It is similar to the unsharpen mask that sharpens everything with contrast above a certain threshold.

radius: the radius of the gaussian, in pixels, not counting the center pixel.

sigma: the standard deviation of the gaussian, in pixels.

threshold: only pixels within this contrast threshold are included in the blur operation.

func (*MagickWand) SepiaToneImage

func (mw *MagickWand) SepiaToneImage(threshold float64) error

Applies a special effect to the image, similar to the effect achieved in a photo darkroom by sepia toning. Threshold ranges from 0 to QuantumRange and is a measure of the extent of the sepia toning. A threshold of 80 is a good starting point for a reasonable tone.

threshold: Define the extent of the sepia toning.

func (*MagickWand) SetAntialias

func (mw *MagickWand) SetAntialias(antialias bool) error

Sets the antialias propery of the wand.

func (*MagickWand) SetBackgroundColor

func (mw *MagickWand) SetBackgroundColor(background *PixelWand) error

Sets the wand background color.

func (*MagickWand) SetColorspace

func (mw *MagickWand) SetColorspace(colorspace ColorspaceType) error

Sets the wand colorspace type.

func (*MagickWand) SetCompression

func (mw *MagickWand) SetCompression(compression CompressionType) error

Sets the wand compression type.

func (*MagickWand) SetCompressionQuality

func (mw *MagickWand) SetCompressionQuality(quality uint) error

Sets the wand compression quality.

func (*MagickWand) SetDepth

func (mw *MagickWand) SetDepth(depth uint) error

Sets the wand pixel depth.

func (*MagickWand) SetExtract

func (mw *MagickWand) SetExtract(geometry string) error

Sets the extract geometry before you read or write an image file. Use it for inline cropping (e.g. 200x200+0+0) or resizing (e.g.200x200).

func (*MagickWand) SetFilename

func (mw *MagickWand) SetFilename(filename string) error

Sets the filename before you read or write an image file.

func (*MagickWand) SetFirstIterator

func (mw *MagickWand) SetFirstIterator()

This method sets the wand iterator to the first image. After using any images added to the wand using AddImage() or ReadImage() will be prepended before any image in the wand. Also the current image has been set to the first image (if any) in the MagickWand. Using NextImage() will then set the current image to the second image in the list (if present). This operation is similar to ResetIterator() but differs in how AddImage(), ReadImage(), and NextImage() behaves afterward.

func (*MagickWand) SetFont

func (mw *MagickWand) SetFont(font string) error

Sets the font associated with the MagickWand.

func (*MagickWand) SetFormat

func (mw *MagickWand) SetFormat(format string) error

Sets the format of the magick wand.

func (*MagickWand) SetGravity

func (mw *MagickWand) SetGravity(gtype GravityType) error

Sets the gravity type.

func (*MagickWand) SetImage

func (mw *MagickWand) SetImage(source *MagickWand) error

Replaces the last image returned by SetImageIndex(), NextImage(), PreviousImage() with the images from the specified wand.

func (*MagickWand) SetImageAlphaChannel

func (mw *MagickWand) SetImageAlphaChannel(operation AlphaChannelType) error

SetImageAlphaChannel activates, deactivates, resets, or sets the alpha channel.

func (*MagickWand) SetImageArtifact

func (mw *MagickWand) SetImageArtifact(artifact, value string) error

Associates a artifact with an image.

func (*MagickWand) SetImageBackgroundColor

func (mw *MagickWand) SetImageBackgroundColor(background *PixelWand) error

Sets the image background color.

func (*MagickWand) SetImageBluePrimary

func (mw *MagickWand) SetImageBluePrimary(x, y, z float64) error

Sets the image chromaticity blue primary point.

func (*MagickWand) SetImageBorderColor

func (mw *MagickWand) SetImageBorderColor(border *PixelWand) error

Sets the image border color.

func (*MagickWand) SetImageChannelMask

func (mw *MagickWand) SetImageChannelMask(channel ChannelType) ChannelType

SetImageChannelMask sets image channel mask, and returns the previous channel type setting. Setting the channel mask impacts the effect of image operations, to limit the operation to the given channel.

func (*MagickWand) SetImageColor

func (mw *MagickWand) SetImageColor(color *PixelWand) error

Set the entire wand canvas to the specified color.

func (*MagickWand) SetImageColormapColor

func (mw *MagickWand) SetImageColormapColor(index uint, color *PixelWand) error

Sets the color of the specified colormap index.

index: the offset into the image colormap.

color: return the colormap color in this wand.

func (*MagickWand) SetImageColorspace

func (mw *MagickWand) SetImageColorspace(colorspace ColorspaceType) error

Sets the image colorspace.

func (*MagickWand) SetImageCompose

func (mw *MagickWand) SetImageCompose(compose CompositeOperator) error

Sets the image composite operator, useful for specifying how to composite / the image thumbnail when using the MontageImage() method.

func (*MagickWand) SetImageCompression

func (mw *MagickWand) SetImageCompression(compression CompressionType) error

Sets the image compression.

func (*MagickWand) SetImageCompressionQuality

func (mw *MagickWand) SetImageCompressionQuality(quality uint) error

Sets the image compression quality.

func (*MagickWand) SetImageDelay

func (mw *MagickWand) SetImageDelay(delay uint) error

Sets the image delay.

delay: the image delay in ticks-per-second units.

func (*MagickWand) SetImageDepth

func (mw *MagickWand) SetImageDepth(depth uint) error

Sets the image depth.

depth: the image depth in bits: 8, 16, or 32.

func (*MagickWand) SetImageDispose

func (mw *MagickWand) SetImageDispose(dispose DisposeType) error

Sets the image disposal method.

func (*MagickWand) SetImageEndian

func (mw *MagickWand) SetImageEndian(endian EndianType) error

Sets the image endian method.

func (*MagickWand) SetImageExtent

func (mw *MagickWand) SetImageExtent(cols, rows uint) error

Sets the image size (i.e. cols & rows).

cols: The image width in pixels.

rows: The image height in pixels.

func (*MagickWand) SetImageFilename

func (mw *MagickWand) SetImageFilename(filename string) error

Sets the filename of a particular image in a sequence.

func (*MagickWand) SetImageFormat

func (mw *MagickWand) SetImageFormat(format string) error

Sets the format of a particular image in a sequence.

format: the image format.

func (*MagickWand) SetImageFuzz

func (mw *MagickWand) SetImageFuzz(fuzz float64) error

Sets the image fuzz.

func (*MagickWand) SetImageGamma

func (mw *MagickWand) SetImageGamma(gamma float64) error

Sets the image gamma.

func (*MagickWand) SetImageGravity

func (mw *MagickWand) SetImageGravity(gravity GravityType) error

Sets the image gravity type.

func (*MagickWand) SetImageGreenPrimary

func (mw *MagickWand) SetImageGreenPrimary(x, y, z float64) error

Sets the image chromaticity green primary point.

func (*MagickWand) SetImageInterlaceScheme

func (mw *MagickWand) SetImageInterlaceScheme(interlace InterlaceType) error

Sets the image interlace scheme.

func (*MagickWand) SetImageInterpolateMethod

func (mw *MagickWand) SetImageInterpolateMethod(method PixelInterpolateMethod) error

Sets the image interpolate pixel method.

func (*MagickWand) SetImageIterations

func (mw *MagickWand) SetImageIterations(iterations uint) error

Sets the image iterations.

func (*MagickWand) SetImageMatte

func (mw *MagickWand) SetImageMatte(matte bool) error

Sets the image matte channel.

func (*MagickWand) SetImageOrientation

func (mw *MagickWand) SetImageOrientation(orientation OrientationType) error

Sets the image orientation.

func (*MagickWand) SetImagePage

func (mw *MagickWand) SetImagePage(width, height uint, x, y int) error

Sets the page geometry of the image.

func (*MagickWand) SetImageProfile

func (mw *MagickWand) SetImageProfile(name string, profile []byte) error

Adds a named profile to the magick wand. If a profile with the same name already exists, it is replaced. This method differs from the ProfileImage() method in that it does not apply any CMS color profiles.

name: Name of profile to add or remove: ICC, IPTC, or generic profile.

func (*MagickWand) SetImageProperty

func (mw *MagickWand) SetImageProperty(property, value string) error

Associates a property with an image.

func (*MagickWand) SetImageRedPrimary

func (mw *MagickWand) SetImageRedPrimary(x, y, z float64) error

Sets the image chromaticity red primary point.

func (*MagickWand) SetImageRenderingIntent

func (mw *MagickWand) SetImageRenderingIntent(ri RenderingIntent) error

Sets the image rendering intent.

func (*MagickWand) SetImageResolution

func (mw *MagickWand) SetImageResolution(xRes, yRes float64) error

Sets the image resolution.

func (*MagickWand) SetImageScene

func (mw *MagickWand) SetImageScene(scene uint) error

Sets the image scene.

func (*MagickWand) SetImageTicksPerSecond

func (mw *MagickWand) SetImageTicksPerSecond(tps int) error

Sets the image ticks-per-second.

func (*MagickWand) SetImageType

func (mw *MagickWand) SetImageType(imgtype ImageType) error

Sets the image type.

func (*MagickWand) SetImageUnits

func (mw *MagickWand) SetImageUnits(units ResolutionType) error

Sets the image units of resolution.

func (*MagickWand) SetImageVirtualPixelMethod

func (mw *MagickWand) SetImageVirtualPixelMethod(method VirtualPixelMethod) VirtualPixelMethod

Sets the image virtual pixel method.

func (*MagickWand) SetImageWhitePoint

func (mw *MagickWand) SetImageWhitePoint(x, y, z float64) error

Sets the image chromaticity white point.

func (*MagickWand) SetInterlaceScheme

func (mw *MagickWand) SetInterlaceScheme(scheme InterlaceType) error

Sets the image interlacing scheme

func (*MagickWand) SetInterpolateMethod

func (mw *MagickWand) SetInterpolateMethod(method PixelInterpolateMethod) error

Sets the interpolate pixel method.

func (*MagickWand) SetIteratorIndex

func (mw *MagickWand) SetIteratorIndex(index int) bool

This method set the iterator to the given position in the image list specified with the index parameter. A zero index will set the first image as current, and so on. Negative indexes can be used to specify an image relative to the end of the images in the wand, with -1 being the last image in the wand. If the index is invalid (range too large for number of images in wand) the function will return false. In that case the current image will not change. After using any images added to the wand using AddImage() or ReadImage() will be added after the image indexed, regardless of if a zero (first image in list) or negative index (from end) is used. Jumping to index 0 is similar to ResetIterator() but differs in how NextImage() behaves afterward.

func (*MagickWand) SetLastIterator

func (mw *MagickWand) SetLastIterator()

SetLastIterator() sets the wand iterator to the last image. The last image is actually the current image, and the next use of PreviousImage() will not change this allowing this function to be used to iterate over the images in the reverse direction. In this sense it is more like ResetIterator() than SetFirstIterator(). Typically this function is used before AddImage(), ReadImage() functions to ensure new images are appended to the very end of wand's image list.

func (*MagickWand) SetOption

func (mw *MagickWand) SetOption(key, value string) error

Associates one or options with the wand (.e.g SetOption(wand, "jpeg:perserve", "yes")).

func (*MagickWand) SetOrientation

func (mw *MagickWand) SetOrientation(orientation OrientationType) error

Sets the wand orientation type.

func (*MagickWand) SetPage

func (mw *MagickWand) SetPage(width, height uint, x, y int) error

Sets the page geometry of the magick wand.

func (*MagickWand) SetPassphrase

func (mw *MagickWand) SetPassphrase(passphrase string) error

Sets the passphrase.

func (*MagickWand) SetPointsize

func (mw *MagickWand) SetPointsize(pointSize float64) error

Sets the font pointsize associated with the MagickWand.

func (*MagickWand) SetResolution

func (mw *MagickWand) SetResolution(xRes, yRes float64) error

Sets the image resolution.

func (*MagickWand) SetResourceLimit

func (mw *MagickWand) SetResourceLimit(rtype ResourceType, limit int64) error

Sets the limit for a particular resource in megabytes.

func (*MagickWand) SetSamplingFactors

func (mw *MagickWand) SetSamplingFactors(samplingFactors []float64) error

Sets the image sampling factors.

samplingFactors: An array of floats representing the sampling factor for each color component (in RGB order).

func (*MagickWand) SetSize

func (mw *MagickWand) SetSize(cols, rows uint) error

Sets the size of the magick wand. Set it before you read a raw image format such as RGB, GRAY, or CMYK.

func (*MagickWand) SetSizeOffset

func (mw *MagickWand) SetSizeOffset(cols, rows uint, offset int) error

Sets the size and offset of the magick wand. Set it before you read a raw image format such as RGB, GRAY, or CMYK.

func (*MagickWand) SetType

func (mw *MagickWand) SetType(itype ImageType) error

Sets the image type attribute.

func (*MagickWand) ShadeImage

func (mw *MagickWand) ShadeImage(gray bool, azimuth, elevation float64) error

Shines a distant light on an image to create a three-dimensional effect. You control the positioning of the light with azimuth and elevation; azimuth is measured in degrees off the x axis and elevation is measured in pixels above the Z axis.

gray: if true, shades the intensity of each pixel.

azimuth, elevation: define the light source direction.

func (*MagickWand) ShadowImage

func (mw *MagickWand) ShadowImage(opacity, sigma float64, x, y int) error

Simulates an image shadow.

opacity: percentage transparency.

sigma: the standard deviation of the Gaussian, in pixels.

x: the shadow x-offset.

y: the shadow y-offset.

func (*MagickWand) SharpenImage

func (mw *MagickWand) SharpenImage(radius, sigma float64) error

Sharpens an image. We convolve the image with a Gaussian operator of the given radius and standard deviation (sigma). For reasonable results, the radius should be larger than sigma. Use a radius of 0 and SharpenImage() selects a suitable radius for you.

radius: the radius of the Gaussian, in pixels, not counting the center pixel.

sigma: the standard deviation of the Gaussian, in pixels.

func (*MagickWand) ShaveImage

func (mw *MagickWand) ShaveImage(cols, rows uint) error

Shaves pixels from the image edges. It allocates the memory necessary for the new Image structure and returns a pointer to the new image.

func (*MagickWand) ShearImage

func (mw *MagickWand) ShearImage(background *PixelWand, xShear, yShear float64) error

Slides one edge of an image along the X or Y axis, creating a parallelogram. An X direction shear slides an edge along the X axis, while a Y direction shear slides an edge along the Y axis. The amount of the shear is controlled by a shear angle. For X direction shears, xShear is measured relative to the Y axis, and similarly, for Y direction shears yShear is measured relative to the X axis. Empty triangles left over from shearing the image are filled with the background color.

func (*MagickWand) SigmoidalContrastImage

func (mw *MagickWand) SigmoidalContrastImage(sharpen bool, alpha, beta float64) error

Adjusts the contrast of an image with a non-linear sigmoidal contrast algorithm. Increase the contrast of the image using a sigmoidal transfer function without saturating highlights or shadows. Contrast indicates how much to increase the contrast (0 is none; 3 is typical; 20 is pushing it); mid-point indicates where midtones fall in the resultant image (0 is white; 50 is middle-gray; 100 is black). Set sharpen to true to increase the image contrast otherwise the contrast is reduced.

sharpen: Increase or decrease image contrast.

alpha: strength of the contrast, the larger the number the more 'threshold-like' it becomes.

beta: midpoint of the function as a color value 0 to QuantumRange.

func (*MagickWand) SimilarityImage

func (mw *MagickWand) SimilarityImage(reference *MagickWand, metric MetricType,
	threshold float64) (offset *RectangleInfo, similarity float64, area *MagickWand)

Compares the reference image of the image and returns the best match offset. In addition, it returns a similarity image such that an exact match location is completely white and if none of the pixels match, black, otherwise some gray level in-between.

reference: the reference wand.

offset: the best match offset of the reference image within the image.

metric: the metric.

threshold: similarity; minimum distortion for (sub)image match.

func (*MagickWand) SketchImage

func (mw *MagickWand) SketchImage(radius, sigma, angle float64) error

Simulates a pencil sketch. We convolve the image with a Gaussian operator of the given radius and standard deviation (sigma). For reasonable results, radius should be larger than sigma. Use a radius of 0 and SketchImage() selects a suitable radius for you. Angle gives the angle of the blurring motion.

radius: the radius of the Gaussian, in pixels, not counting the center pixel.

sigma: the standard deviation of the Gaussian, in pixels.

angle: Apply the effect along this angle.

func (*MagickWand) SmushImages

func (mw *MagickWand) SmushImages(stack bool, offset int) *MagickWand

Takes all images from the current image pointer to the end of the image list and smushs them to each other top-to-bottom if the stack parameter is true, otherwise left-to-right.

stack: by default, images are stacked left-to-right. Set stack to true to stack them top-to-bottom.

offset: minimum distance in pixels between images.

func (*MagickWand) SolarizeImage

func (mw *MagickWand) SolarizeImage(threshold float64) error

Applies a special effect to the image, similar to the effect achieved in a photo darkroom by selectively exposing areas of photo sensitive paper to light. Threshold ranges from 0 to QuantumRange and is a measure of the extent of the solarization.

threshold: define the extent of the solarization.

func (*MagickWand) SparseColorImage

func (mw *MagickWand) SparseColorImage(channel ChannelType, method SparseColorMethod,
	arguments []float64) error

Given a set of coordinates, interpolates the colors found at those coordinates, across the whole image, using various methods.

method: the method of image sparseion. ArcSparseColorion will always ignore source image offset, and always 'bestfit' the destination image with the top left corner offset relative to the polar mapping center. Bilinear has no simple inverse mapping so will not allow 'bestfit' style of image sparseion. Affine, Perspective, and Bilinear, will do least squares fitting of the distortion when more than the minimum number of control point pairs are provided. Perspective, and Bilinear, will fall back to a Affine sparseion when less than 4 control point pairs are provided. While Affine sparseions will let you use any number of control point pairs, that is Zero pairs is a No-Op (viewport only) distortion, one pair is a translation and two pairs of control points will do a scale-rotate-translate, without any shearing.

arguments: the arguments for this sparseion method.

func (*MagickWand) SpliceImage

func (mw *MagickWand) SpliceImage(width, height uint, x, y int) error

Splices a solid color into the image.

func (*MagickWand) SpreadImage

func (mw *MagickWand) SpreadImage(method PixelInterpolateMethod, radius float64) error

Is a special effects method that randomly displaces each pixel in a block defined by the radius parameter.

method: intepolation method.

radius: Choose a random pixel in a neighborhood of this extent.

func (*MagickWand) StatisticImage

func (mw *MagickWand) StatisticImage(stype StatisticType, width, height uint) error

Replace each pixel with corresponding statistic from the neighborhood of the specified width and height.

type: the statistic type (e.g. median, mode, etc.).

width: the width of the pixel neighborhood.

height: the height of the pixel neighborhood.

func (*MagickWand) SteganoImage

func (mw *MagickWand) SteganoImage(watermark *MagickWand, offset int) *MagickWand

Hides a digital watermark within the image. Recover the hidden watermark later to prove that the authenticity of an image. Offset defines the start position within the image to hide the watermark.

offset: start hiding at this offset into the image.

func (*MagickWand) StereoImage

func (mw *MagickWand) StereoImage(offset *MagickWand) *MagickWand

Composites two images and produces a single image that is the composite of a left and right image of a stereo pair.

func (*MagickWand) StripImage

func (mw *MagickWand) StripImage() error

Strips an image of all profiles and comments.

func (*MagickWand) SwirlImage

func (mw *MagickWand) SwirlImage(degrees float64, method PixelInterpolateMethod) error

Swirls the pixels about the center of the image, where degrees indicates the sweep of the arc through which each pixel is moved. You get a more dramatic effect as the degrees move from 1 to 360.

degrees: define the tightness of the swirling effect.

method: the pixel interpolation method.

func (*MagickWand) TextureImage

func (mw *MagickWand) TextureImage(texture *MagickWand) *MagickWand

Repeatedly tiles the texture image across and down the image canvas.

func (*MagickWand) ThresholdImage

func (mw *MagickWand) ThresholdImage(threshold float64) error

Changes the value of individual pixels based on the intensity of each pixel compared to threshold. The result is a high-contrast, two color image.

threshold: define the threshold value.

func (*MagickWand) ThresholdImageChannel

func (mw *MagickWand) ThresholdImageChannel(channel ChannelType, threshold float64) error

Changes the value of individual pixels based on the intensity of each pixel compared to threshold. The result is a high-contrast, two color image.

threshold: define the threshold value.

func (*MagickWand) ThumbnailImage

func (mw *MagickWand) ThumbnailImage(cols, rows uint) error

Changes the size of an image to the given dimensions and removes any associated profiles. The goal is to produce small low cost thumbnail images suited for display on the Web.

func (*MagickWand) TintImage

func (mw *MagickWand) TintImage(tint, opacity *PixelWand) error

Applies a color vector to each pixel in the image. The length of the vector is 0 for black and white and at its maximum for the midtones. The vector weighting function is f(x)=(1-(4.0*((x-0.5)*(x-0.5)))).

tint: the tint pixel wand.

opacity: the opacity pixel wand.

func (*MagickWand) TransformImageColorspace

func (mw *MagickWand) TransformImageColorspace(colorspace ColorspaceType) error

Transform the image colorspace, setting the images colorspace while transforming the images data to that colorspace.

func (*MagickWand) TransparentPaintImage

func (mw *MagickWand) TransparentPaintImage(target *PixelWand, alpha, fuzz float64, invert bool) error

Changes any pixel that matches color with the color defined by fill.

alpha: the level of transparency: 1.0 is fully opaque and 0.0 is fully transparent.

fuzz: by default target must match a particular pixel color exactly. However, in many cases two colors may differ by a small amount. The fuzz member of image defines how much tolerance is acceptable to consider two colors as the same. For example, set fuzz to 10 and the color red at intensities of 100 and 102 respectively are now interpreted as the same color for the purposes of the floodfill.

invert: paint any pixel that does not match the target color.

func (*MagickWand) TransposeImage

func (mw *MagickWand) TransposeImage() error

Creates a vertical mirror image by reflecting the pixels around the central x-axis while rotating them 90-degrees.

func (*MagickWand) TransverseImage

func (mw *MagickWand) TransverseImage() error

Creates a horizontal mirror image by reflecting the pixels around the central y-axis while rotating them 270-degrees.

func (*MagickWand) TrimImage

func (mw *MagickWand) TrimImage(fuzz float64) error

Remove edges that are the background color from the image.

fuzz: by default target must match a particular pixel color exactly. However, in many cases two colors may differ by a small amount. The fuzz member of image defines how much tolerance is acceptable to consider two colors as the same. For example, set fuzz to 10 and the color red at intensities of 100 and 102 respectively are now interpreted as the same color for the purposes of the floodfill.

func (*MagickWand) UniqueImageColors

func (mw *MagickWand) UniqueImageColors() error

Discards all but one of any pixel color.

func (*MagickWand) UnsharpMaskImage

func (mw *MagickWand) UnsharpMaskImage(radius, sigma, amount, threshold float64) error

Unsharpens an image. We convolve the image with a Gaussian operator of the given radius and standard deviation (sigma). For reasonable results, radius should be larger than sigma. Use a radius of 0 and UnsharpMaskImage() selects a suitable radius for you.

radius: the radius of the Gaussian, in pixels, not counting the center pixel.

sigma: the standard deviation of the Gaussian, in pixels.

amount: the percentage of the difference between the original and the blur image that is added back into the original.

threshold: the threshold in pixels needed to apply the diffence amount.

func (*MagickWand) VignetteImage

func (mw *MagickWand) VignetteImage(blackPoint, whitePoint float64, x, y int) error

Softens the edges of the image in vignette style.

x, y: define the x and y ellipse offset.

func (*MagickWand) WaveImage

func (mw *MagickWand) WaveImage(amplitude, wavelength float64,
	method PixelInterpolateMethod) error

Creates a "ripple" effect in the image by shifting the pixels vertically along a sine wave whose amplitude and wavelength is specified by the given parameters.

amplitude, wavelength: Define the amplitude and wave length of the sine wave.

method: the pixel interpolation method

func (*MagickWand) WhiteThresholdImage

func (mw *MagickWand) WhiteThresholdImage(threshold *PixelWand) error

Is like ThresholdImage() but force all pixels above the threshold into white while leaving all pixels below the threshold unchanged.

func (*MagickWand) WriteImage

func (mw *MagickWand) WriteImage(filename string) error

Writes an image to the specified filename.

func (*MagickWand) WriteImageFile

func (mw *MagickWand) WriteImageFile(out *os.File) error

Writes an image to an open file descriptor.

func (*MagickWand) WriteImages

func (mw *MagickWand) WriteImages(filename string, adjoin bool) error

Writes an image or image sequence.

func (*MagickWand) WriteImagesFile

func (mw *MagickWand) WriteImagesFile(out *os.File) error

Writes an image sequence to an open file descriptor.

type MagickWandException

type MagickWandException struct {
	// contains filtered or unexported fields
}

func (*MagickWandException) Error

func (mwe *MagickWandException) Error() string

type MetricType

type MetricType int
const (
	METRIC_UNDEFINED                          MetricType = C.UndefinedErrorMetric
	METRIC_ABSOLUTE_ERROR                     MetricType = C.AbsoluteErrorMetric
	METRIC_FUZZ_ERROR                         MetricType = C.FuzzErrorMetric
	METRIC_MEAN_ABSOLUTE_ERROR                MetricType = C.MeanAbsoluteErrorMetric
	METRIC_MEAN_ERROR_PER_PIXEL               MetricType = C.MeanErrorPerPixelErrorMetric
	METRIC_MEAN_SQUARED_ERROR                 MetricType = C.MeanSquaredErrorMetric
	METRIC_NORMALIZED_CROSS_CORRELATION_ERROR MetricType = C.NormalizedCrossCorrelationErrorMetric
	METRIC_PEAK_ABSOLUTE_ERROR                MetricType = C.PeakAbsoluteErrorMetric
	METRIC_PEAK_SIGNAL_TO_NOISE_RATIO         MetricType = C.PeakSignalToNoiseRatioErrorMetric
	METRIC_PERCEPTUAL_HASH_ERROR              MetricType = C.PerceptualHashErrorMetric
	METRIC_ROOT_MEAN_SQUARED_ERROR            MetricType = C.RootMeanSquaredErrorMetric
)

type MontageMode

type MontageMode int
const (
	MONTAGE_MODE_UNDEFINED   MontageMode = C.UndefinedMode
	MONTAGE_MODE_FRAME       MontageMode = C.FrameMode
	MONTAGE_MODE_UNFRAME     MontageMode = C.UnframeMode
	MONTAGE_MODE_CONCATENATE MontageMode = C.ConcatenateMode
)

type MorphologyMethod

type MorphologyMethod int
const (
	MORPHOLOGY_UNDEFINED          MorphologyMethod = C.UndefinedMorphology
	MORPHOLOGY_CONVOLVE           MorphologyMethod = C.ConvolveMorphology          /* Weighted Sum with reflected kernel */
	MORPHOLOGY_CORRELATE          MorphologyMethod = C.CorrelateMorphology         /* Weighted Sum using a sliding window */
	MORPHOLOGY_ERODE              MorphologyMethod = C.ErodeMorphology             /* Minimum Value in Neighbourhood */
	MORPHOLOGY_DILATE             MorphologyMethod = C.DilateMorphology            /* Maximum Value in Neighbourhood */
	MORPHOLOGY_ERODE_INTENSITY    MorphologyMethod = C.ErodeIntensityMorphology    /* Pixel Pick using GreyScale Erode */
	MORPHOLOGY_DILATE_INTENSITY   MorphologyMethod = C.DilateIntensityMorphology   /* Pixel Pick using GreyScale Dialate */
	MORPHOLOGY_DISTANCE           MorphologyMethod = C.DistanceMorphology          /* Add Kernel Value, take Minimum */
	MORPHOLOGY_OPEN               MorphologyMethod = C.OpenMorphology              /* Dilate then Erode */
	MORPHOLOGY_CLOSE              MorphologyMethod = C.CloseMorphology             /* Erode then Dilate */
	MORPHOLOGY_OPEN_INTENSITY     MorphologyMethod = C.OpenIntensityMorphology     /* Pixel Pick using GreyScale Open */
	MORPHOLOGY_CLOSE_INTENSITY    MorphologyMethod = C.CloseIntensityMorphology    /* Pixel Pick using GreyScale Close */
	MORPHOLOGY_SMOOTH             MorphologyMethod = C.SmoothMorphology            /* Open then Close */
	MORPHOLOGY_EDGE_IN            MorphologyMethod = C.EdgeInMorphology            /* Dilate difference from Original */
	MORPHOLOGY_EDGE_OUT           MorphologyMethod = C.EdgeOutMorphology           /* Erode difference from Original */
	MORPHOLOGY_EDGE               MorphologyMethod = C.EdgeMorphology              /* Dilate difference with Erode */
	MORPHOLOGY_TOP_HAT            MorphologyMethod = C.TopHatMorphology            /* Close difference from Original */
	MORPHOLOGY_BOTTOM_HAT         MorphologyMethod = C.BottomHatMorphology         /* Open difference from Original */
	MORPHOLOGY_HIT_AND_MISS       MorphologyMethod = C.HitAndMissMorphology        /* Foreground/Background pattern matching */
	MORPHOLOGY_THINNING           MorphologyMethod = C.ThinningMorphology          /* Remove matching pixels from image */
	MORPHOLOGY_THICKEN            MorphologyMethod = C.ThickenMorphology           /* Add matching pixels from image */
	MORPHOLOGY_VORONOI            MorphologyMethod = C.VoronoiMorphology           /* distance matte channel copy nearest color */
	MORPHOLOGY_ITERATIVE_DISTANCE MorphologyMethod = C.IterativeDistanceMorphology /* Add Kernel Value, take Minimum */
)

type NoiseType

type NoiseType int
const (
	NOISE_UNDEFINED               NoiseType = C.UndefinedNoise
	NOISE_UNIFORM                 NoiseType = C.UniformNoise
	NOISE_GAUSSIAN                NoiseType = C.GaussianNoise
	NOISE_MULTIPLICATIVE_GAUSSIAN NoiseType = C.MultiplicativeGaussianNoise
	NOISE_IMPULSE                 NoiseType = C.ImpulseNoise
	NOISE_LAPLACIAN               NoiseType = C.LaplacianNoise
	NOISE_POISSON                 NoiseType = C.PoissonNoise
	NOISE_RANDOM                  NoiseType = C.RandomNoise
)

type OrientationType

type OrientationType int
const (
	ORIENTATION_UNDEFINED    OrientationType = C.UndefinedOrientation
	ORIENTATION_TOP_LEFT     OrientationType = C.TopLeftOrientation
	ORIENTATION_TOP_RIGHT    OrientationType = C.TopRightOrientation
	ORIENTATION_BOTTOM_RIGHT OrientationType = C.BottomRightOrientation
	ORIENTATION_BOTTOM_LEFT  OrientationType = C.BottomLeftOrientation
	ORIENTATION_LEFT_TOP     OrientationType = C.LeftTopOrientation
	ORIENTATION_RIGHT_TOP    OrientationType = C.RightTopOrientation
	ORIENTATION_RIGHT_BOTTOM OrientationType = C.RightBottomOrientation
	ORIENTATION_LEFT_BOTTOM  OrientationType = C.LeftBottomOrientation
)

type PaintMethod

type PaintMethod int
const (
	PAINT_METHOD_UNDEFINED    PaintMethod = C.UndefinedMethod
	PAINT_METHOD_POINT        PaintMethod = C.PointMethod
	PAINT_METHOD_REPLACE      PaintMethod = C.ReplaceMethod
	PAINT_METHOD_FLOODFILL    PaintMethod = C.FloodfillMethod
	PAINT_METHOD_FILLTOBORDER PaintMethod = C.FillToBorderMethod
	PAINT_METHOD_RESET        PaintMethod = C.ResetMethod
)

type PixelInfo

type PixelInfo struct {
	// contains filtered or unexported fields
}

type PixelInterpolateMethod

type PixelInterpolateMethod int
const (
	INTERPOLATE_PIXEL_UNDEFINED           PixelInterpolateMethod = C.UndefinedInterpolatePixel
	INTERPOLATE_PIXEL_AVERAGE             PixelInterpolateMethod = C.AverageInterpolatePixel    // Average 4 nearest neighbours
	INTERPOLATE_PIXEL_AVERAGE16           PixelInterpolateMethod = C.Average16InterpolatePixel  // Average 16 nearest neighbours
	INTERPOLATE_PIXEL_AVERAGE9            PixelInterpolateMethod = C.Average9InterpolatePixel   // Average 9 nearest neighbours
	INTERPOLATE_PIXEL_BACKGROUND          PixelInterpolateMethod = C.BackgroundInterpolatePixel // just return background color
	INTERPOLATE_PIXEL_BILINEAR            PixelInterpolateMethod = C.BilinearInterpolatePixel   // Triangular filter interpolation
	INTERPOLATE_PIXEL_BLEND               PixelInterpolateMethod = C.BlendInterpolatePixel      // blend of nearest 1, 2 or 4 pixels
	INTERPOLATE_PIXEL_CATROM              PixelInterpolateMethod = C.CatromInterpolatePixel     // Catmull-Rom interpolation
	INTERPOLATE_PIXEL_INTEGER             PixelInterpolateMethod = C.IntegerInterpolatePixel    // Integer (floor) interpolation
	INTERPOLATE_PIXEL_MESH                PixelInterpolateMethod = C.MeshInterpolatePixel       // Triangular mesh interpolation
	INTERPOLATE_PIXEL_NEAREST_INTERPOLATE PixelInterpolateMethod = C.NearestInterpolatePixel    // Nearest neighbour only
	INTERPOLATE_PIXEL_SPLINE              PixelInterpolateMethod = C.SplineInterpolatePixel     // Cubic Spline (blurred) interpolation
)

type PixelIterator

type PixelIterator struct {
	// contains filtered or unexported fields
}

func (*PixelIterator) Clear

func (pi *PixelIterator) Clear()

Clear resources associated with a PixelIterator.

func (*PixelIterator) Clone

func (pi *PixelIterator) Clone() *PixelIterator

Makes an exact copy of the specified iterator.

func (*PixelIterator) DecreaseCount added in v1.1.0

func (pi *PixelIterator) DecreaseCount()

Decrease DrawingWand ref counter and set according "can be terminated status"

func (*PixelIterator) Destroy

func (pi *PixelIterator) Destroy()

Deallocates resources associated with a PixelIterator.

func (*PixelIterator) GetCurrentIteratorRow

func (pi *PixelIterator) GetCurrentIteratorRow() (pws []*PixelWand)

Returns the current row as an array of pixel wands from the pixel iterator.

func (*PixelIterator) GetIteratorRow

func (pi *PixelIterator) GetIteratorRow() int

Returns the current pixel iterator row.

func (*PixelIterator) GetLastError

func (pi *PixelIterator) GetLastError() error

Returns the kind, reason and description of any error that occurs when using other methods in this API

func (*PixelIterator) GetNextIteratorRow

func (pi *PixelIterator) GetNextIteratorRow() (pws []*PixelWand)

Returns the next row as an array of pixel wands from the pixel iterator.

func (*PixelIterator) GetPreviousIteratorRow

func (pi *PixelIterator) GetPreviousIteratorRow() (pws []*PixelWand)

Returns the previous row as an array of pixel wands from the pixel iterator.

func (*PixelIterator) IncreaseCount added in v1.1.0

func (pi *PixelIterator) IncreaseCount()

Increase PixelIterator ref counter and set according "can`t be terminated status"

func (*PixelIterator) IsVerified

func (pi *PixelIterator) IsVerified() bool

Returns true if the iterator is verified as a pixel iterator.

func (*PixelIterator) Reset

func (pi *PixelIterator) Reset()

Resets the pixel iterator. Use it in conjunction with GetNextIteratorRow() to iterate over all the pixels in a pixel container.

func (*PixelIterator) SetFirstIteratorRow

func (pi *PixelIterator) SetFirstIteratorRow()

Sets the pixel iterator to the first pixel row.

func (*PixelIterator) SetIteratorRow

func (pi *PixelIterator) SetIteratorRow(row int) error

Set the pixel iterator row.

func (*PixelIterator) SetLastIteratorRow

func (pi *PixelIterator) SetLastIteratorRow()

Sets the pixel iterator to the last pixel row.

func (*PixelIterator) SyncIterator

func (pi *PixelIterator) SyncIterator() error

Syncs the pixel iterator.

type PixelIteratorException

type PixelIteratorException struct {
	// contains filtered or unexported fields
}

func (*PixelIteratorException) Error

func (pie *PixelIteratorException) Error() string

type PixelPacket

type PixelPacket struct {
	// contains filtered or unexported fields
}

type PixelWand

type PixelWand struct {
	// contains filtered or unexported fields
}

func NewPixelWand

func NewPixelWand() *PixelWand

Returns a new pixel wand

func (*PixelWand) Clear

func (pw *PixelWand) Clear()

Clears resources associated with the wand

func (*PixelWand) Clone

func (pw *PixelWand) Clone() *PixelWand

Makes an exact copy of the wand

func (*PixelWand) DecreaseCount added in v1.1.0

func (pw *PixelWand) DecreaseCount()

Decrease PixelWand ref counter and set according "can be terminated status"

func (*PixelWand) Destroy

func (pw *PixelWand) Destroy()

Deallocates resources associated with a pixel wand

func (*PixelWand) GetAlpha

func (pw *PixelWand) GetAlpha() float64

Returns the normalized alpha color of the pixel wand

func (*PixelWand) GetAlphaQuantum

func (pw *PixelWand) GetAlphaQuantum() Quantum

Returns the alpha value of the pixel wand

func (*PixelWand) GetBlack

func (pw *PixelWand) GetBlack() float64

Returns the normalized black color of the pixel wand

func (*PixelWand) GetBlackQuantum

func (pw *PixelWand) GetBlackQuantum() Quantum

Returns the black color of the pixel wand

func (*PixelWand) GetBlue

func (pw *PixelWand) GetBlue() float64

Returns the normalized blue color of the pixel wand

func (*PixelWand) GetBlueQuantum

func (pw *PixelWand) GetBlueQuantum() Quantum

Returns the blue color of the pixel wand

func (*PixelWand) GetColorAsNormalizedString

func (pw *PixelWand) GetColorAsNormalizedString() string

Returns the normalized color of the pixel wand as string

func (*PixelWand) GetColorAsString

func (pw *PixelWand) GetColorAsString() string

Returns the color of the pixel wand as a string

func (*PixelWand) GetColorCount

func (pw *PixelWand) GetColorCount() uint

Returns the color count associated with this color

func (*PixelWand) GetCyan

func (pw *PixelWand) GetCyan() float64

Returns the normalized cyan color of the pixel wand

func (*PixelWand) GetCyanQuantum

func (pw *PixelWand) GetCyanQuantum() Quantum

Returns the cyan color of the pixel wand

func (*PixelWand) GetFuzz

func (pw *PixelWand) GetFuzz() float64

Returns the normalized fuzz value of the pixel wand

func (*PixelWand) GetGreen

func (pw *PixelWand) GetGreen() float64

Returns the normalized green color of the pixel wand

func (*PixelWand) GetGreenQuantum

func (pw *PixelWand) GetGreenQuantum() Quantum

Returns the green color of the pixel wand

func (*PixelWand) GetHSL

func (pw *PixelWand) GetHSL() (hue, saturation, brightness float64)

Returns the normalized HSL color of the pixel wand

func (*PixelWand) GetIndex

func (pw *PixelWand) GetIndex() IndexPacket

Returns the colormap index from the pixel wand

func (*PixelWand) GetLastError

func (pw *PixelWand) GetLastError() error

Returns the kind, reason and description of any error that occurs when using other methods in this API

func (*PixelWand) GetMagenta

func (pw *PixelWand) GetMagenta() float64

Returns the normalized magenta color of the pixel wand

func (*PixelWand) GetMagentaQuantum

func (pw *PixelWand) GetMagentaQuantum() Quantum

Returns the magenta color of the pixel wand

func (*PixelWand) GetMagickColor

func (pw *PixelWand) GetMagickColor() *PixelInfo

Gets the magick color of the pixel wand

func (*PixelWand) GetOpacity deprecated

func (pw *PixelWand) GetOpacity() float64

Deprecated: Use GetAlpha()

func (*PixelWand) GetOpacityQuantum deprecated

func (pw *PixelWand) GetOpacityQuantum() Quantum

Deprecated: Use GetAlphaQuantum()

func (*PixelWand) GetQuantumColor

func (pw *PixelWand) GetQuantumColor() *PixelInfo

Gets the color of the pixel wand as a PixelPacket

func (*PixelWand) GetRed

func (pw *PixelWand) GetRed() float64

Returns the normalized red color of the pixel wand

func (*PixelWand) GetRedQuantum

func (pw *PixelWand) GetRedQuantum() Quantum

Returns the red color of the pixel wand

func (*PixelWand) GetYellow

func (pw *PixelWand) GetYellow() float64

Returns the normalized yellow color of the pixel wand

func (*PixelWand) GetYellowQuantum

func (pw *PixelWand) GetYellowQuantum() Quantum

Returns the yellow color of the pixel wand

func (*PixelWand) IncreaseCount added in v1.1.0

func (pw *PixelWand) IncreaseCount()

Increase PixelWand ref counter and set according "can`t be terminated status"

func (*PixelWand) IsSimilar

func (pw *PixelWand) IsSimilar(pixelWand *PixelWand, fuzz float64) bool

Returns true if the distance between two colors is less than the specified distance

func (*PixelWand) IsVerified

func (pw *PixelWand) IsVerified() bool

Returns true if the wand is verified as a pixel wand

func (*PixelWand) SetAlpha

func (pw *PixelWand) SetAlpha(alpha float64)

Sets the normalized alpha color of the pixel wand. 1.0 is fully opaque and 0.0 is fully transparent.

func (*PixelWand) SetAlphaQuantum

func (pw *PixelWand) SetAlphaQuantum(opacity Quantum)

Sets the alpha color of the pixel wand

func (*PixelWand) SetBlack

func (pw *PixelWand) SetBlack(black float64)

Sets the normalized black color of the pixel wand

func (*PixelWand) SetBlackQuantum

func (pw *PixelWand) SetBlackQuantum(black Quantum)

Sets the black color of the pixel wand

func (*PixelWand) SetBlue

func (pw *PixelWand) SetBlue(blue float64)

Sets the normalized blue color of the pixel wand

func (*PixelWand) SetBlueQuantum

func (pw *PixelWand) SetBlueQuantum(blue Quantum)

Sets the blue color of the pixel wand

func (*PixelWand) SetColor

func (pw *PixelWand) SetColor(color string) bool

Sets the color of the pixel wand with a string (e.g. "blue", "#0000ff", "rgb(0,0,255)", "cmyk(100,100,100,10)", etc.)

func (*PixelWand) SetColorCount

func (pw *PixelWand) SetColorCount(count uint)

Sets the color count of the pixel wand

func (*PixelWand) SetColorFromWand

func (pw *PixelWand) SetColorFromWand(pixelWand *PixelWand)

Sets the color of the pixel wand from another one

func (*PixelWand) SetCyan

func (pw *PixelWand) SetCyan(cyan float64)

Sets the normalized cyan color of the pixel wand

func (*PixelWand) SetCyanQuantum

func (pw *PixelWand) SetCyanQuantum(cyan Quantum)

Sets the cyan color of the pixel wand

func (*PixelWand) SetFuzz

func (pw *PixelWand) SetFuzz(fuzz float64)

Sets the fuzz value of the pixel wand

func (*PixelWand) SetGreen

func (pw *PixelWand) SetGreen(green float64)

Sets the normalized green color of the pixel wand

func (*PixelWand) SetGreenQuantum

func (pw *PixelWand) SetGreenQuantum(green Quantum)

Sets the green color of the pixel wand

func (*PixelWand) SetHSL

func (pw *PixelWand) SetHSL(hue, saturation, brightness float64)

Sets the normalized HSL color of the pixel wand

func (*PixelWand) SetIndex

func (pw *PixelWand) SetIndex(quantum Quantum)

Sets the colormap index of the pixel wand

func (*PixelWand) SetMagenta

func (pw *PixelWand) SetMagenta(magenta float64)

Sets the normalized magenta color of the pixel wand

func (*PixelWand) SetMagentaQuantum

func (pw *PixelWand) SetMagentaQuantum(magenta Quantum)

Sets the magenta color of the pixel wand

func (*PixelWand) SetMagickColor

func (pw *PixelWand) SetMagickColor(color *PixelInfo)

Deprecared: Use SetPixelColor

func (*PixelWand) SetOpacity deprecated

func (pw *PixelWand) SetOpacity(opacity float64)

Deprecated: Use SetAlpha()

func (*PixelWand) SetOpacityQuantum

func (pw *PixelWand) SetOpacityQuantum(opacity Quantum)

Deprecared: USe SetAlphaQuantum()

func (*PixelWand) SetPixelColor

func (pw *PixelWand) SetPixelColor(color *PixelInfo)

Sets the color of the pixel wand

func (*PixelWand) SetRed

func (pw *PixelWand) SetRed(red float64)

Sets the normalized red color of the pixel wand

func (*PixelWand) SetRedQuantum

func (pw *PixelWand) SetRedQuantum(red Quantum)

Sets the red color of the pixel wand

func (*PixelWand) SetYellow

func (pw *PixelWand) SetYellow(yellow float64)

Sets the normalized yellow color of the pixel wand

func (*PixelWand) SetYellowQuantum

func (pw *PixelWand) SetYellowQuantum(yellow Quantum)

Sets the yellow color of the pixel wand

type PixelWandException

type PixelWandException struct {
	// contains filtered or unexported fields
}

func (*PixelWandException) Error

func (pwe *PixelWandException) Error() string

type PointInfo

type PointInfo struct {
	X float64
	Y float64
}

type PreviewType

type PreviewType int
const (
	PREVIEW_UNDEFINED        PreviewType = C.UndefinedPreview
	PREVIEW_ROTATE           PreviewType = C.RotatePreview
	PREVIEW_SHEAR            PreviewType = C.ShearPreview
	PREVIEW_ROLL             PreviewType = C.RollPreview
	PREVIEW_HUE              PreviewType = C.HuePreview
	PREVIEW_SATURATION       PreviewType = C.SaturationPreview
	PREVIEW_BRIGHTNESS       PreviewType = C.BrightnessPreview
	PREVIEW_GAMMA            PreviewType = C.GammaPreview
	PREVIEW_SPIFF            PreviewType = C.SpiffPreview
	PREVIEW_DULL             PreviewType = C.DullPreview
	PREVIEW_GRAYSCALE        PreviewType = C.GrayscalePreview
	PREVIEW_QUANTIZE         PreviewType = C.QuantizePreview
	PREVIEW_DESPECKLE        PreviewType = C.DespecklePreview
	PREVIEW_REDUCE_NOISE     PreviewType = C.ReduceNoisePreview
	PREVIEW_ADD_NOISE        PreviewType = C.AddNoisePreview
	PREVIEW_SHARPEN          PreviewType = C.SharpenPreview
	PREVIEW_BLUR             PreviewType = C.BlurPreview
	PREVIEW_THRESHOLD        PreviewType = C.ThresholdPreview
	PREVIEW_EDGE_DETECT      PreviewType = C.EdgeDetectPreview
	PREVIEW_SPREAD           PreviewType = C.SpreadPreview
	PREVIEW_SOLARIZE         PreviewType = C.SolarizePreview
	PREVIEW_SHADE            PreviewType = C.ShadePreview
	PREVIEW_RAISE            PreviewType = C.RaisePreview
	PREVIEW_SEGMENT          PreviewType = C.SegmentPreview
	PREVIEW_SWIRL            PreviewType = C.SwirlPreview
	PREVIEW_IMPLODE          PreviewType = C.ImplodePreview
	PREVIEW_WAVE             PreviewType = C.WavePreview
	PREVIEW_OIL_PAINT        PreviewType = C.OilPaintPreview
	PREVIEW_CHARCOAL_DRAWING PreviewType = C.CharcoalDrawingPreview
	PREVIEW_JPEG             PreviewType = C.JPEGPreview
)

type Quantum

type Quantum C.Quantum

type RectangleInfo

type RectangleInfo struct {
	// contains filtered or unexported fields
}

type RenderingIntent

type RenderingIntent int
const (
	RENDERING_INTENT_UNDEFINED  RenderingIntent = C.UndefinedIntent
	RENDERING_INTENT_SATURATION RenderingIntent = C.SaturationIntent
	RENDERING_INTENT_PERCEPTUAL RenderingIntent = C.PerceptualIntent
	RENDERING_INTENT_ABSOLUTE   RenderingIntent = C.AbsoluteIntent
	RENDERING_INTENT_RELATIVE   RenderingIntent = C.RelativeIntent
)

type ResolutionType

type ResolutionType int
const (
	RESOLUTION_UNDEFINED             ResolutionType = C.UndefinedResolution
	RESOLUTION_PIXELS_PER_INCH       ResolutionType = C.PixelsPerInchResolution
	RESOLUTION_PIXELS_PER_CENTIMETER ResolutionType = C.PixelsPerCentimeterResolution
)

type ResourceType

type ResourceType int
const (
	RESOURCE_UNDEFINED ResourceType = C.UndefinedResource
	RESOURCE_AREA      ResourceType = C.AreaResource
	RESOURCE_DISK      ResourceType = C.DiskResource
	RESOURCE_FILE      ResourceType = C.FileResource
	RESOURCE_MAP       ResourceType = C.MapResource
	RESOURCE_MEMORY    ResourceType = C.MemoryResource
	RESOURCE_THREAD    ResourceType = C.ThreadResource
	RESOURCE_TIME      ResourceType = C.TimeResource
	RESOURCE_THROTTLE  ResourceType = C.ThrottleResource
)

type SparseColorMethod

type SparseColorMethod int
const (
	INTERPOLATE_UNDEFINED_COLOR   SparseColorMethod = C.UndefinedColorInterpolate
	INTERPOLATE_BARYCENTRIC_COLOR SparseColorMethod = C.BarycentricColorInterpolate
	INTERPOLATE_BILINEAR_COLOR    SparseColorMethod = C.BilinearColorInterpolate
	INTERPOLATE_POLYNOMIAL_COLOR  SparseColorMethod = C.PolynomialColorInterpolate
	INTERPOLATE_SHEPARDS_COLOR    SparseColorMethod = C.ShepardsColorInterpolate
	INTERPOLATE_VORONOI_COLOR     SparseColorMethod = C.VoronoiColorInterpolate
	INTERPOLATE_INVERSE_COLOR     SparseColorMethod = C.InverseColorInterpolate
)

type StatisticType

type StatisticType int
const (
	STATISTIC_UNDEFINED          StatisticType = C.UndefinedStatistic
	STATISTIC_GRADIENT           StatisticType = C.GradientStatistic
	STATISTIC_MAXIMUM            StatisticType = C.MaximumStatistic
	STATISTIC_MEAN               StatisticType = C.MeanStatistic
	STATISTIC_MEDIAN             StatisticType = C.MedianStatistic
	STATISTIC_MINIMUM            StatisticType = C.MinimumStatistic
	STATISTIC_MODE               StatisticType = C.ModeStatistic
	STATISTIC_NONPEAK            StatisticType = C.NonpeakStatistic
	STATISTIC_STANDARD_DEVIATION StatisticType = C.StandardDeviationStatistic
)

type StorageType

type StorageType int
const (
	PIXEL_UNDEFINED StorageType = C.UndefinedPixel
	PIXEL_CHAR      StorageType = C.CharPixel
	PIXEL_DOUBLE    StorageType = C.DoublePixel
	PIXEL_FLOAT     StorageType = C.FloatPixel
	PIXEL_LONGLONG  StorageType = C.LongLongPixel
	PIXEL_LONG      StorageType = C.LongPixel
	PIXEL_QUANTUM   StorageType = C.QuantumPixel
	PIXEL_SHORT     StorageType = C.ShortPixel
)

type StretchType

type StretchType int
const (
	STRETCH_UNDEFINED       StretchType = C.UndefinedStretch
	STRETCH_NORMAL          StretchType = C.NormalStretch
	STRETCH_ULTRA_CONDENSED StretchType = C.UltraCondensedStretch
	STRETCH_EXTRA_CONDENSED StretchType = C.ExtraCondensedStretch
	STRETCH_CONDENSED       StretchType = C.CondensedStretch
	STRETCH_SEMI_CONDENSED  StretchType = C.SemiCondensedStretch
	STRETCH_SEMI_EXPANDED   StretchType = C.SemiExpandedStretch
	STRETCH_EXPANDED        StretchType = C.ExpandedStretch
	STRETCH_EXTRA_EXPANDED  StretchType = C.ExtraExpandedStretch
	STRETCH_ULTRA_EXPANDED  StretchType = C.UltraExpandedStretch
	STRETCH_ANY             StretchType = C.AnyStretch
)

type StyleType

type StyleType int
const (
	STYLE_UNDEFINED StyleType = C.UndefinedStyle
	STYLE_NORMAL    StyleType = C.NormalStyle
	STYLE_ITALIC    StyleType = C.ItalicStyle
	STYLE_OBLIQUE   StyleType = C.ObliqueStyle
	STYLE_ANYSTYLE  StyleType = C.AnyStyle
)

type VirtualPixelMethod

type VirtualPixelMethod int

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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