imagick.v2: gopkg.in/gographics/imagick.v2/imagick Index | Files | Directories

package imagick

import "gopkg.in/gographics/imagick.v2/imagick"

Index

Package Files

affine_matrix.go align_type.go alpha_channel_type.go channel_features.go channel_statistics.go channel_type.go clip_path_units.go colorspace_type.go composite_operator.go compression_type.go conversions.go decoration_type.go destroy.go dispose_type.go distort_image_method.go dither_method.go draw_info.go drawing_wand.go drawing_wand_exception.go endian_type.go evaluate_operator.go exception_type.go fill_rule.go filter_type.go font_metrics.go geometry_flags.go geometry_info.go gravity_type.go image.go image_info.go image_layer_method.go image_type.go imagick.go index_packet.go interlace_type.go interpolate_pixel_method.go kernel_info.go kernel_info_type.go kernel_normalize_type.go line_cap.go line_join.go magick_core_env.go magick_function.go magick_pixel_packet.go magick_version.go magick_wand.go magick_wand_env.go magick_wand_exception.go magick_wand_image.go magick_wand_prop.go memory.go metric_type.go montage_mode.go morphology_method.go noise_type.go orientation_type.go paint_method.go pixel_iterator.go pixel_iterator_exception.go pixel_packet.go pixel_wand.go pixel_wand_exception.go point_info.go preview_type.go quantum.go rectangle_info.go rendering_intent.go resolution_type.go resource_type.go sparse_color_method.go statistic_type.go storage_type.go stretch_type.go style_type.go virtual_pixel_method.go

Constants

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
)

func ConvertRGBToHSB Uses

func ConvertRGBToHSB(qr, qg, qb Quantum) (h, s, b float64)

func ConvertRGBToHSL Uses

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

func CoreInitialize Uses

func CoreInitialize(path string)

func CoreTerminate Uses

func CoreTerminate()

func Destroy Uses

func Destroy(d types.Destroyer)

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

func GetCopyright Uses

func GetCopyright() string

Returns the ImageMagick API copyright as a string constant.

func GetHomeURL Uses

func GetHomeURL() string

Returns the ImageMagick home URL.

func GetPackageName Uses

func GetPackageName() string

Returns the ImageMagick package name as a string constant.

func GetPrecision Uses

func GetPrecision() int

func GetQuantumDepth Uses

func GetQuantumDepth() (string, uint)

Returns the ImageMagick quantum depth as a string constant.

func GetQuantumRange Uses

func GetQuantumRange() (string, uint)

Returns the ImageMagick quantum range as a string constant.

func GetReleaseDate Uses

func GetReleaseDate() string

Returns the ImageMagick release date as a string constant.

func GetResource Uses

func GetResource(rtype ResourceType) int64

Returns the specified resource in megabytes.

func GetResourceLimit Uses

func GetResourceLimit(rtype ResourceType) int64

Returns the specified resource limit in megabytes.

func GetVersion Uses

func GetVersion() (version string, nversion uint)

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

func Initialize Uses

func Initialize()

Initializes the MagickWand environment

func IsCoreInstantiated Uses

func IsCoreInstantiated() bool

func SetPrecision Uses

func SetPrecision(precision int)

func SetResourceLimit Uses

func SetResourceLimit(rtype ResourceType, limit uint64) bool

Specify resource limit at package level.

func Terminate Uses

func Terminate()

Terminates the MagickWand environment wait until all imageMagick objects destroyed

type AffineMatrix Uses

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

AffineMatrix represents an ImageMagick AffineMatrix struct

func NewAffineMatrix Uses

func NewAffineMatrix() *AffineMatrix

NewAffineMatrix constructs an AffineMatrix that is initialized to the indentify matrix

func (*AffineMatrix) ResetToIdentity Uses

func (a *AffineMatrix) ResetToIdentity()

ResetToIdentity resets the AffineMatrix to the identity matrix

func (*AffineMatrix) RotateX Uses

func (a *AffineMatrix) RotateX() float64

RotateX returns the RX value

func (*AffineMatrix) RotateY Uses

func (a *AffineMatrix) RotateY() float64

RotateY returns the RY value

func (*AffineMatrix) ScaleX Uses

func (a *AffineMatrix) ScaleX() float64

ScaleX returns the SX value

func (*AffineMatrix) ScaleY Uses

func (a *AffineMatrix) ScaleY() float64

ScaleY returns the SY value

func (*AffineMatrix) SetRotateX Uses

func (a *AffineMatrix) SetRotateX(val float64)

SetRotateX sets the RX value

func (*AffineMatrix) SetRotateY Uses

func (a *AffineMatrix) SetRotateY(val float64)

SetRotateY sets the RY value

func (*AffineMatrix) SetScaleX Uses

func (a *AffineMatrix) SetScaleX(val float64)

SetScaleX sets the SX value

func (*AffineMatrix) SetScaleY Uses

func (a *AffineMatrix) SetScaleY(val float64)

SetScaleY sets the SY value

func (*AffineMatrix) SetTranslateX Uses

func (a *AffineMatrix) SetTranslateX(val float64)

SetTranslateX sets the TX value

func (*AffineMatrix) SetTranslateY Uses

func (a *AffineMatrix) SetTranslateY(val float64)

SetTranslateY sets the TY value

func (*AffineMatrix) TranslateX Uses

func (a *AffineMatrix) TranslateX() float64

TranslateX returns the TX value

func (*AffineMatrix) TranslateY Uses

func (a *AffineMatrix) TranslateY() float64

TranslateY returns the TY value

type AlignType Uses

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 Uses

type AlphaChannelType int
const (
    ALPHA_CHANNEL_UNDEFINED   AlphaChannelType = C.UndefinedAlphaChannel
    ALPHA_CHANNEL_ACTIVATE    AlphaChannelType = C.ActivateAlphaChannel
    ALPHA_CHANNEL_BACKGROUND  AlphaChannelType = C.BackgroundAlphaChannel
    ALPHA_CHANNEL_COPY        AlphaChannelType = C.CopyAlphaChannel
    ALPHA_CHANNEL_DEACTIVATE  AlphaChannelType = C.DeactivateAlphaChannel
    ALPHA_CHANNEL_EXTRACT     AlphaChannelType = C.ExtractAlphaChannel
    ALPHA_CHANNEL_OPAQUE      AlphaChannelType = C.OpaqueAlphaChannel
    ALPHA_CHANNEL_RESET       AlphaChannelType = C.ResetAlphaChannel
    ALPHA_CHANNEL_SET         AlphaChannelType = C.SetAlphaChannel
    ALPHA_CHANNEL_SHAPE       AlphaChannelType = C.ShapeAlphaChannel
    ALPHA_CHANNEL_TRANSPARENT AlphaChannelType = C.TransparentAlphaChannel
    ALPHA_CHANNEL_FLATTEN     AlphaChannelType = C.FlattenAlphaChannel
    ALPHA_CHANNEL_REMOVE      AlphaChannelType = C.RemoveAlphaChannel
)

type ChannelFeatures Uses

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

type ChannelStatistics Uses

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

type ChannelType Uses

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 Uses

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 Uses

type ColorspaceType int
const (
    COLORSPACE_UNDEFINED   ColorspaceType = C.UndefinedColorspace
    COLORSPACE_RGB         ColorspaceType = C.RGBColorspace
    COLORSPACE_GRAY        ColorspaceType = C.GRAYColorspace
    COLORSPACE_TRANSPARENT ColorspaceType = C.TransparentColorspace
    COLORSPACE_OHTA        ColorspaceType = C.OHTAColorspace
    COLORSPACE_LAB         ColorspaceType = C.LabColorspace
    COLORSPACE_XYZ         ColorspaceType = C.XYZColorspace
    COLORSPACE_YCBCR       ColorspaceType = C.YCbCrColorspace
    COLORSPACE_YCC         ColorspaceType = C.YCCColorspace
    COLORSPACE_YIQ         ColorspaceType = C.YIQColorspace
    COLORSPACE_YPBPR       ColorspaceType = C.YPbPrColorspace
    COLORSPACE_YUV         ColorspaceType = C.YUVColorspace
    COLORSPACE_CMYK        ColorspaceType = C.CMYKColorspace
    COLORSPACE_SRGB        ColorspaceType = C.sRGBColorspace
    COLORSPACE_HSB         ColorspaceType = C.HSBColorspace
    COLORSPACE_HSL         ColorspaceType = C.HSLColorspace
    COLORSPACE_HWB         ColorspaceType = C.HWBColorspace
    COLORSPACE_REC601LUMA  ColorspaceType = C.Rec601LumaColorspace
    COLORSPACE_REC601YCBCR ColorspaceType = C.Rec601YCbCrColorspace
    COLORSPACE_REC709LUMA  ColorspaceType = C.Rec709LumaColorspace
    COLORSPACE_REC709YCBCR ColorspaceType = C.Rec709YCbCrColorspace
    COLORSPACE_LOG         ColorspaceType = C.LogColorspace
    COLORSPACE_CMY         ColorspaceType = C.CMYColorspace
)

type CompositeOperator Uses

type CompositeOperator int
const (
    COMPOSITE_OP_UNDEFINED         CompositeOperator = C.UndefinedCompositeOp
    COMPOSITE_OP_NO                CompositeOperator = C.NoCompositeOp
    COMPOSITE_OP_MODULUS_ADD       CompositeOperator = C.ModulusAddCompositeOp
    COMPOSITE_OP_ATOP              CompositeOperator = C.AtopCompositeOp
    COMPOSITE_OP_BLEND             CompositeOperator = C.BlendCompositeOp
    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_BLACK        CompositeOperator = C.CopyBlackCompositeOp
    COMPOSITE_OP_COPY_BLUE         CompositeOperator = C.CopyBlueCompositeOp
    COMPOSITE_OP_COPY              CompositeOperator = C.CopyCompositeOp
    COMPOSITE_OP_COPY_CYAN         CompositeOperator = C.CopyCyanCompositeOp
    COMPOSITE_OP_COPY_GREEN        CompositeOperator = C.CopyGreenCompositeOp
    COMPOSITE_OP_COPY_MAGENTA      CompositeOperator = C.CopyMagentaCompositeOp
    COMPOSITE_OP_COPY_OPACITY      CompositeOperator = C.CopyOpacityCompositeOp
    COMPOSITE_OP_COPY_RED          CompositeOperator = C.CopyRedCompositeOp
    COMPOSITE_OP_COPY_YELLOW       CompositeOperator = C.CopyYellowCompositeOp
    COMPOSITE_OP_DARKEN            CompositeOperator = C.DarkenCompositeOp
    COMPOSITE_OP_DST_ATOP          CompositeOperator = C.DstAtopCompositeOp
    COMPOSITE_OP_DST               CompositeOperator = C.DstCompositeOp
    COMPOSITE_OP_DST_IN            CompositeOperator = C.DstInCompositeOp
    COMPOSITE_OP_DST_OUT           CompositeOperator = C.DstOutCompositeOp
    COMPOSITE_OP_DST_OVER          CompositeOperator = C.DstOverCompositeOp
    COMPOSITE_OP_DIFFERENCE        CompositeOperator = C.DifferenceCompositeOp
    COMPOSITE_OP_DISPLACE          CompositeOperator = C.DisplaceCompositeOp
    COMPOSITE_OP_DISSOLVE          CompositeOperator = C.DissolveCompositeOp
    COMPOSITE_OP_EXCLUSION         CompositeOperator = C.ExclusionCompositeOp
    COMPOSITE_OP_HARD_LIGHT        CompositeOperator = C.HardLightCompositeOp
    COMPOSITE_OP_HUE               CompositeOperator = C.HueCompositeOp
    COMPOSITE_OP_IN                CompositeOperator = C.InCompositeOp
    COMPOSITE_OP_LIGHTEN           CompositeOperator = C.LightenCompositeOp
    COMPOSITE_OP_LINEAR_LIGHT      CompositeOperator = C.LinearLightCompositeOp
    COMPOSITE_OP_LUMINIZE          CompositeOperator = C.LuminizeCompositeOp
    COMPOSITE_OP_MINUS_DST         CompositeOperator = C.MinusDstCompositeOp
    COMPOSITE_OP_MODULATE          CompositeOperator = C.ModulateCompositeOp
    COMPOSITE_OP_MULTIPLY          CompositeOperator = C.MultiplyCompositeOp
    COMPOSITE_OP_OUT               CompositeOperator = C.OutCompositeOp
    COMPOSITE_OP_OVER              CompositeOperator = C.OverCompositeOp
    COMPOSITE_OP_OVERLAY           CompositeOperator = C.OverlayCompositeOp
    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_ATOP          CompositeOperator = C.SrcAtopCompositeOp
    COMPOSITE_OP_SRC               CompositeOperator = C.SrcCompositeOp
    COMPOSITE_OP_SRC_IN            CompositeOperator = C.SrcInCompositeOp
    COMPOSITE_OP_SRC_OUT           CompositeOperator = C.SrcOutCompositeOp
    COMPOSITE_OP_SRC_OVER          CompositeOperator = C.SrcOverCompositeOp
    COMPOSITE_OP_MODULUS_SUBTRACT  CompositeOperator = C.ModulusSubtractCompositeOp
    COMPOSITE_OP_THRESHOLD         CompositeOperator = C.ThresholdCompositeOp
    COMPOSITE_OP_XOR               CompositeOperator = C.XorCompositeOp
    COMPOSITE_OP_DIVIDE__DST       CompositeOperator = C.DivideDstCompositeOp
    COMPOSITE_OP_DISTORT           CompositeOperator = C.DistortCompositeOp
    COMPOSITE_OP_BLUR              CompositeOperator = C.BlurCompositeOp
    COMPOSITE_OP_PEGTOP_LIGHT      CompositeOperator = C.PegtopLightCompositeOp
    COMPOSITE_OP_VIVID_LIGHT       CompositeOperator = C.VividLightCompositeOp
    COMPOSITE_OP_PIN_LIGHT         CompositeOperator = C.PinLightCompositeOp
    COMPOSITE_OP_LINEAR_DODGE      CompositeOperator = C.LinearDodgeCompositeOp
    COMPOSITE_OP_LINEAR_BURN       CompositeOperator = C.LinearBurnCompositeOp
    COMPOSITE_OP_MATHEMATICS       CompositeOperator = C.MathematicsCompositeOp
    COMPOSITE_OP_DIVIDE_SRC        CompositeOperator = C.DivideSrcCompositeOp
    COMPOSITE_OP_MINUS_SRC         CompositeOperator = C.MinusSrcCompositeOp
    COMPOSITE_OP_DARKEN_INTENSITY  CompositeOperator = C.DarkenIntensityCompositeOp
    COMPOSITE_OP_LIGHTEN_INTENSITY CompositeOperator = C.LightenIntensityCompositeOp
)

type CompressionType Uses

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 Uses

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 Uses

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 Uses

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

type DitherMethod Uses

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 Uses

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

func NewDrawInfo Uses

func NewDrawInfo() *DrawInfo

type DrawingWand Uses

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

func NewDrawingWand Uses

func NewDrawingWand() *DrawingWand

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

func (*DrawingWand) Affine Uses

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) Annotation Uses

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 Uses

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 Uses

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

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

func (*DrawingWand) Circle Uses

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 Uses

func (dw *DrawingWand) Clear()

Clears resources associated with the drawing wand.

func (*DrawingWand) Clone Uses

func (dw *DrawingWand) Clone() *DrawingWand

Makes an exact copy of the specified wand.

func (*DrawingWand) Color Uses

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 Uses

func (dw *DrawingWand) Comment(comment string)

Adds a comment to a vector output stream.

func (*DrawingWand) Composite Uses

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 Uses

func (dw *DrawingWand) DecreaseCount()

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

func (*DrawingWand) Destroy Uses

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 Uses

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 Uses

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

Returns the border color used for drawing bordered objects.

func (*DrawingWand) GetClipPath Uses

func (dw *DrawingWand) GetClipPath() string

Obtains the current clipping path ID.

func (*DrawingWand) GetClipRule Uses

func (dw *DrawingWand) GetClipRule() FillRule

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

func (*DrawingWand) GetClipUnits Uses

func (dw *DrawingWand) GetClipUnits() ClipPathUnits

Returns the interpretation of clip path units.

func (*DrawingWand) GetFillColor Uses

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

Returns the fill color used for drawing filled objects.

func (*DrawingWand) GetFillOpacity Uses

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 Uses

func (dw *DrawingWand) GetFillRule() FillRule

Returns the fill rule used while drawing polygons.

func (*DrawingWand) GetFont Uses

func (dw *DrawingWand) GetFont() string

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

func (*DrawingWand) GetFontFamily Uses

func (dw *DrawingWand) GetFontFamily() string

Returns the font family to use when annotating with text.

func (*DrawingWand) GetFontResolution Uses

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

Gets the image X and Y resolution.

func (*DrawingWand) GetFontStretch Uses

func (dw *DrawingWand) GetFontStretch() StretchType

Returns the font stretch used when annotating with text.

func (*DrawingWand) GetFontStyle Uses

func (dw *DrawingWand) GetFontStyle() StyleType

Returns the font style used when annotating with text.

func (*DrawingWand) GetFontWeight Uses

func (dw *DrawingWand) GetFontWeight() uint

Returns the font weight used when annotating with text.

func (*DrawingWand) GetGravity Uses

func (dw *DrawingWand) GetGravity() GravityType

Returns the text placement gravity used when annotating with text.

func (*DrawingWand) GetLastError Uses

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 Uses

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 Uses

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 Uses

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

Returns the color used for stroking object outlines.

func (*DrawingWand) GetStrokeDashArray Uses

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 Uses

func (dw *DrawingWand) GetStrokeDashOffset() float64

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

func (*DrawingWand) GetStrokeLineCap Uses

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 Uses

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 Uses

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 Uses

func (dw *DrawingWand) GetStrokeOpacity() float64

Returns the opacity of stroked object outlines.

func (*DrawingWand) GetStrokeWidth Uses

func (dw *DrawingWand) GetStrokeWidth() float64

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

func (*DrawingWand) GetTextAlignment Uses

func (dw *DrawingWand) GetTextAlignment() AlignType

Returns the alignment applied when annotating with text.

func (*DrawingWand) GetTextAntialias Uses

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 Uses

func (dw *DrawingWand) GetTextDecoration() DecorationType

Returns the decoration applied when annotating with text.

func (*DrawingWand) GetTextEncoding Uses

func (dw *DrawingWand) GetTextEncoding() string

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

func (*DrawingWand) GetTextInterlineSpacing Uses

func (dw *DrawingWand) GetTextInterlineSpacing() float64

Gets the spacing between lines in text.

func (*DrawingWand) GetTextInterwordSpacing Uses

func (dw *DrawingWand) GetTextInterwordSpacing() float64

Gets the spacing between words in text.

func (*DrawingWand) GetTextKerning Uses

func (dw *DrawingWand) GetTextKerning() float64

Gets the spacing between characters in text.

func (*DrawingWand) GetTextUnderColor Uses

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

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

func (*DrawingWand) GetVectorGraphics Uses

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 Uses

func (dw *DrawingWand) IncreaseCount()

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

func (*DrawingWand) IsVerified Uses

func (dw *DrawingWand) IsVerified() bool

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

func (*DrawingWand) Line Uses

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 Uses

func (dw *DrawingWand) Matte(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) PathClose Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

func (dw *DrawingWand) PathFinish()

Terminates the current path.

func (*DrawingWand) PathLineToAbsolute Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

func (dw *DrawingWand) PeekDrawingWand() *DrawInfo

Returns the current drawing wand.

func (*DrawingWand) Point Uses

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

Draws a point using the current fill color.

x, y: target x, y coordinates

func (*DrawingWand) Polygon Uses

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 Uses

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 Uses

func (dw *DrawingWand) PopClipPath()

Terminates a clip path definition.

func (*DrawingWand) PopDefs Uses

func (dw *DrawingWand) PopDefs()

Terminates a definition list.

func (*DrawingWand) PopDrawingWand Uses

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 Uses

func (dw *DrawingWand) PopPattern() error

Terminates a pattern definition.

func (*DrawingWand) PushClipPath Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

func (dw *DrawingWand) ResetVectorGraphics()

Resets the vector graphics associated with the specified wand.

func (*DrawingWand) Rotate Uses

func (dw *DrawingWand) Rotate(degrees float64)

Applies the specified rotation to the current coordinate space.

degrees: degrees of rotation

func (*DrawingWand) RoundRectangle Uses

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 Uses

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 Uses

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

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

func (*DrawingWand) SetClipPath Uses

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 Uses

func (dw *DrawingWand) SetClipRule(fillRule FillRule)

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

func (*DrawingWand) SetClipUnits Uses

func (dw *DrawingWand) SetClipUnits(clipUnits ClipPathUnits)

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

func (*DrawingWand) SetFillColor Uses

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

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

func (*DrawingWand) SetFillOpacity Uses

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 Uses

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 Uses

func (dw *DrawingWand) SetFillRule(fillRule FillRule)

Sets the fill rule to use while drawing polygons.

func (*DrawingWand) SetFont Uses

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

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

func (*DrawingWand) SetFontFamily Uses

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

Sets the font family to use when annotating with text.

func (*DrawingWand) SetFontResolution Uses

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

Sets the image resolution.

xRes, yRes: the image x and y resolutions

func (*DrawingWand) SetFontSize Uses

func (dw *DrawingWand) SetFontSize(pointSize float64)

Sets the font pointsize to use when annotating with text.

pointSize: text pointsize

func (*DrawingWand) SetFontStretch Uses

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 Uses

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 Uses

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 Uses

func (dw *DrawingWand) SetGravity(gravity GravityType)

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

func (*DrawingWand) SetOpacity Uses

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 Uses

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 Uses

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

Sets the color used for stroking object outlines.

func (*DrawingWand) SetStrokeDashArray Uses

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 Uses

func (dw *DrawingWand) SetStrokeDashOffset(offset float64)

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

func (*DrawingWand) SetStrokeLineCap Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

func (dw *DrawingWand) SetStrokeWidth(width float64)

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

func (*DrawingWand) SetTextAlignment Uses

func (dw *DrawingWand) SetTextAlignment(alignment AlignType)

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

func (*DrawingWand) SetTextAntialias Uses

func (dw *DrawingWand) SetTextAntialias(antialias bool)

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

func (*DrawingWand) SetTextDecoration Uses

func (dw *DrawingWand) SetTextDecoration(decoration DecorationType)

Specifies a decoration to be applied when annotating with text.

func (*DrawingWand) SetTextEncoding Uses

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 Uses

func (dw *DrawingWand) SetTextInterlineSpacing(spacing float64)

Sets the spacing between line in text.

func (*DrawingWand) SetTextInterwordSpacing Uses

func (dw *DrawingWand) SetTextInterwordSpacing(spacing float64)

Sets the spacing between words in text.

func (*DrawingWand) SetTextKerning Uses

func (dw *DrawingWand) SetTextKerning(kerning float64)

Sets the spacing between characters in text.

func (*DrawingWand) SetTextUnderColor Uses

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

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

func (*DrawingWand) SetVectorGraphics Uses

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 Uses

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

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 Uses

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 Uses

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 Uses

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 Uses

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

func (*DrawingWandException) Error Uses

func (dwe *DrawingWandException) Error() string

type EndianType Uses

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

type EvaluateOperator Uses

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 ExceptionType Uses

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 Uses

func (et *ExceptionType) String() string

type FillRule Uses

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

type FilterType Uses

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 Uses

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 Uses

func NewFontMetricsFromArray(arr []float64) *FontMetrics

type GeometryInfo Uses

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

type GravityType Uses

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
    GRAVITY_STATIC     GravityType = C.StaticGravity
)

type Image Uses

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

func NewMagickImage Uses

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

type ImageInfo Uses

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

type ImageLayerMethod Uses

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 Uses

type ImageType int
const (
    IMAGE_TYPE_UNDEFINED              ImageType = C.UndefinedType
    IMAGE_TYPE_BILEVEL                ImageType = C.BilevelType
    IMAGE_TYPE_GRAYSCALE              ImageType = C.GrayscaleType
    IMAGE_TYPE_GRAYSCALE_MATTE        ImageType = C.GrayscaleMatteType
    IMAGE_TYPE_PALETTE                ImageType = C.PaletteType
    IMAGE_TYPE_PALETTE_MATTE          ImageType = C.PaletteMatteType
    IMAGE_TYPE_TRUE_COLOR             ImageType = C.TrueColorType
    IMAGE_TYPE_TRUE_COLOR_MATTE       ImageType = C.TrueColorMatteType
    IMAGE_TYPE_COLOR_SEPARATION       ImageType = C.ColorSeparationType
    IMAGE_TYPE_COLOR_SEPARATION_MATTE ImageType = C.ColorSeparationMatteType
    IMAGE_TYPE_OPTIMIZE               ImageType = C.OptimizeType
    IMAGE_TYPE_PALETTE_BILEVEL_MATTE  ImageType = C.PaletteBilevelMatteType
)

type IndexPacket Uses

type IndexPacket Quantum

type InterlaceType Uses

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 InterpolatePixelMethod Uses

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

type KernelInfo Uses

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

This struct represents the KernelInfo C API of ImageMagick

func NewKernelInfo Uses

func NewKernelInfo(kernel string) *KernelInfo

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.

KernelInfo will be nil if an error occured.

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 Uses

func NewKernelInfoBuiltIn(typ KernelInfoType, kernel string) *KernelInfo

Create a kernel from a builtin in kernel.

KernelInfo will be nil if an error occured.

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 Uses

func (ki *KernelInfo) Destroy()

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

func (*KernelInfo) Scale Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 MagickPixelPacket Uses

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

type MagickWand Uses

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

This struct represents the MagickWand C API of ImageMagick

func NewMagickWand Uses

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 Uses

func NewMagickWandFromImage(img *Image) *MagickWand

Returns a wand with an image

func (*MagickWand) AdaptiveBlurImage Uses

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) AdaptiveBlurImageChannel Uses

func (mw *MagickWand) AdaptiveBlurImageChannel(channel ChannelType, 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 Uses

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

Adaptively resize image with data dependent triangulation

func (*MagickWand) AdaptiveSharpenImage Uses

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) AdaptiveSharpenImageChannel Uses

func (mw *MagickWand) AdaptiveSharpenImageChannel(channel ChannelType, 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 Uses

func (mw *MagickWand) AdaptiveThresholdImage(width, height uint, offset int) 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 Uses

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 Uses

func (mw *MagickWand) AddNoiseImage(noiseType NoiseType) error

Adds random noise to the image

func (*MagickWand) AddNoiseImageChannel Uses

func (mw *MagickWand) AddNoiseImageChannel(channel ChannelType, noiseType NoiseType) error

Adds random noise to the image's channel

func (*MagickWand) AffineTransformImage Uses

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

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

func (*MagickWand) AnimateImages Uses

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

Animates an image or image sequence

func (*MagickWand) AnnotateImage Uses

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 Uses

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 Uses

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) AutoGammaImageChannel Uses

func (mw *MagickWand) AutoGammaImageChannel(channel ChannelType) error

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

func (*MagickWand) AutoLevelImage Uses

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) AutoLevelImageChannel Uses

func (mw *MagickWand) AutoLevelImageChannel(channel ChannelType) error

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

func (*MagickWand) AutoOrientImage Uses

func (mw *MagickWand) AutoOrientImage() error

Auto orient the image

func (*MagickWand) BlackThresholdImage Uses

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 Uses

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 Uses

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) BlurImageChannel Uses

func (mw *MagickWand) BlurImageChannel(channel ChannelType, radius, sigma float64) error

Blurs an image's channel. 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 Uses

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

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

func (*MagickWand) BrightnessContrastImage Uses

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) BrightnessContrastImageChannel Uses

func (mw *MagickWand) BrightnessContrastImageChannel(channel ChannelType, brightness, contrast float64) error

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

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

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

func (*MagickWand) CharcoalImage Uses

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 Uses

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 Uses

func (mw *MagickWand) ClampImage() error

Restricts the color range from 0 to the quantum depth

func (*MagickWand) ClampImageChannel Uses

func (mw *MagickWand) ClampImageChannel(channel ChannelType) error

Restricts the color range from 0 to the quantum depth

func (*MagickWand) Clear Uses

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 Uses

func (mw *MagickWand) ClipImage() error

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

func (*MagickWand) ClipImagePath Uses

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 Uses

func (mw *MagickWand) Clone() *MagickWand

Makes an exact copy of the MagickWand object

func (*MagickWand) ClutImage Uses

func (mw *MagickWand) ClutImage(clut *MagickWand) error

Replaces colors in the image from a color lookup table

func (*MagickWand) ClutImageChannel Uses

func (mw *MagickWand) ClutImageChannel(channel ChannelType, clut *MagickWand) error

Replaces colors in the image's channel from a color lookup table

func (*MagickWand) CoalesceImages Uses

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 Uses

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 Uses

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 Uses

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

Blends the fill color with each pixel in the image

func (*MagickWand) CombineImages Uses

func (mw *MagickWand) CombineImages(channel ChannelType) *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 hannels of the combined image. The typical ordering would be image 1 => Red, 2 => Green, 3 => Blue, etc.

func (*MagickWand) CommentImage Uses

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

Adds a comment to your image

func (*MagickWand) CompareImageChannels Uses

func (mw *MagickWand) CompareImageChannels(reference *MagickWand, channel ChannelType, metric MetricType) (wand *MagickWand, distortion float64)

Compares one or more image channels of an image to a reconstructed image and returns the difference image

func (*MagickWand) CompareImageLayers Uses

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

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

func (*MagickWand) CompareImages Uses

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 Uses

func (mw *MagickWand) CompositeImage(source *MagickWand, compose CompositeOperator, 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) CompositeImageChannel Uses

func (mw *MagickWand) CompositeImageChannel(channel ChannelType, source *MagickWand, compose CompositeOperator, 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 Uses

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 Uses

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 Uses

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 Uses

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) ContrastStretchImageChannel Uses

func (mw *MagickWand) ContrastStretchImageChannel(channel ChannelType, blackPoint, whitePoint float64) error

Enhances the contrast of a color image's channel 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 Uses

func (mw *MagickWand) ConvolveImage(order uint, kernel []float64) error

Applies a custom convolution kernel to the image.

order: the number of cols and rows in the filter kernel

kernel: an array of doubles, representing the convolution kernel

func (*MagickWand) ConvolveImageChannel Uses

func (mw *MagickWand) ConvolveImageChannel(channel ChannelType, order uint, kernel []float64) error

Applies a custom convolution kernel to the image's channel.

order: the number of cols and rows in the filter kernel

kernel: an array of doubles, representing the convolution kernel

func (*MagickWand) CropImage Uses

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

Extracts a region of the image

func (*MagickWand) CycleColormapImage Uses

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 Uses

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

Converts cipher pixels to plain pixels

func (*MagickWand) DeconstructImages Uses

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 Uses

func (mw *MagickWand) DecreaseCount()

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

func (*MagickWand) DeleteImageArtifact Uses

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

This method deletes a wand artifact

func (*MagickWand) DeleteImageProperty Uses

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

This method deletes a image property

func (*MagickWand) DeleteOption Uses

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

This method deletes a wand option

func (*MagickWand) DeskewImage Uses

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 Uses

func (mw *MagickWand) DespeckleImage() error

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

func (*MagickWand) Destroy Uses

func (mw *MagickWand) Destroy()

Deallocates memory associated with an MagickWand

func (*MagickWand) DestroyImage Uses

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 Uses

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

Displays and image

func (*MagickWand) DisplayImages Uses

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

Displays and image or image sequence

func (*MagickWand) DistortImage Uses

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 Uses

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

Renders the drawing wand on the current image

func (*MagickWand) EdgeImage Uses

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 Uses

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 Uses

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

Converts plain pixels to cipher pixels

func (*MagickWand) EnhanceImage Uses

func (mw *MagickWand) EnhanceImage() error

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

func (*MagickWand) EqualizeImage Uses

func (mw *MagickWand) EqualizeImage() error

Equalizes the image histogram.

func (*MagickWand) EqualizeImageChannel Uses

func (mw *MagickWand) EqualizeImageChannel(channel ChannelType) error

Equalizes the image's channel histogram.

func (*MagickWand) EvaluateImage Uses

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) EvaluateImageChannel Uses

func (mw *MagickWand) EvaluateImageChannel(channel ChannelType, 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 Uses

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 Uses

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_INTEGER  => []int32
PIXEL_LONG     => []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 Uses

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) FilterImage Uses

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

Applies a custom convolution kernel to the image.

kernel: An array of doubles representing the convolution kernel.

func (*MagickWand) FilterImageChannel Uses

func (mw *MagickWand) FilterImageChannel(channel ChannelType, kernel *KernelInfo) error

Applies a custom convolution kernel to the image's channel.

kernel: An array of doubles representing the convolution kernel.

func (*MagickWand) FlipImage Uses

func (mw *MagickWand) FlipImage() error

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

func (*MagickWand) FloodfillPaintImage Uses

func (mw *MagickWand) FloodfillPaintImage(channel ChannelType, 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 Uses

func (mw *MagickWand) FlopImage() error

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

func (*MagickWand) ForwardFourierTransformImage Uses

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 Uses

func (mw *MagickWand) FrameImage(matteColor *PixelWand, width, height uint, innerBevel, outerBevel int) 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.

func (*MagickWand) FunctionImage Uses

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) FunctionImageChannel Uses

func (mw *MagickWand) FunctionImageChannel(channel ChannelType, function MagickFunction, args []float64) error

Applys an arithmetic, relational, or logical expression to an image's channel. 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 Uses

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

Evaluate expression for each pixel in the image.

func (*MagickWand) FxImageChannel Uses

func (mw *MagickWand) FxImageChannel(channel ChannelType, expression string) *MagickWand

Evaluate expression for each pixel in the image's channel

func (*MagickWand) GammaImage Uses

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) GammaImageChannel Uses

func (mw *MagickWand) GammaImageChannel(channel ChannelType, gamma float64) error

Gamma-corrects an image's channel. 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 Uses

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) GaussianBlurImageChannel Uses

func (mw *MagickWand) GaussianBlurImageChannel(channel ChannelType, radius, sigma float64) error

Blurs an image's channel. 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 Uses

func (mw *MagickWand) GetAntialias() bool

Returns the antialias property associated with the wand

func (*MagickWand) GetBackgroundColor Uses

func (mw *MagickWand) GetBackgroundColor() *PixelWand

Returns the wand background color

func (*MagickWand) GetColorspace Uses

func (mw *MagickWand) GetColorspace() ColorspaceType

Returns the wand colorspace type

func (*MagickWand) GetCompression Uses

func (mw *MagickWand) GetCompression() CompressionType

Gets the wand compression type.

func (*MagickWand) GetCompressionQuality Uses

func (mw *MagickWand) GetCompressionQuality() uint

Gets the wand compression quality.

func (*MagickWand) GetFilename Uses

func (mw *MagickWand) GetFilename() string

Returns the filename associated with an image sequence.

func (*MagickWand) GetFont Uses

func (mw *MagickWand) GetFont() string

Returns the font associated with the MagickWand.

func (*MagickWand) GetFormat Uses

func (mw *MagickWand) GetFormat() string

Returns the format of the magick wand.

func (*MagickWand) GetGravity Uses

func (mw *MagickWand) GetGravity() GravityType

Gets the wand gravity.

func (*MagickWand) GetImage Uses

func (mw *MagickWand) GetImage() *MagickWand

Gets the image at the current image index.

func (*MagickWand) GetImageAlphaChannel Uses

func (mw *MagickWand) GetImageAlphaChannel() bool

Returns false 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 Uses

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

Returns a value associated with the specified artifact.

func (*MagickWand) GetImageArtifacts Uses

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 Uses

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

Returns the image background color.

func (*MagickWand) GetImageBlob Uses

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 Uses

func (mw *MagickWand) GetImageBluePrimary() (x, y 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.

func (*MagickWand) GetImageBorderColor Uses

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

Returns the image border color.

func (*MagickWand) GetImageChannelDepth Uses

func (mw *MagickWand) GetImageChannelDepth(channel ChannelType) uint

Gets the depth for one or more image channels.

func (*MagickWand) GetImageChannelDistortion Uses

func (mw *MagickWand) GetImageChannelDistortion(reference *MagickWand, channel ChannelType, metric MetricType) (distortion float64, err error)

Compares one or more image channels of an image to a reconstructed image and returns the specified distortion metrics

func (*MagickWand) GetImageChannelDistortions Uses

func (mw *MagickWand) GetImageChannelDistortions(reference *MagickWand, metric MetricType) float64

Compares one or more image channels of an image to a reconstructed image and returns the specified distortion metrics.

func (*MagickWand) GetImageChannelFeatures Uses

func (mw *MagickWand) GetImageChannelFeatures(distance uint) []ChannelFeatures

Returns features for each channel in the image in each of four directions (horizontal, vertical, left and right diagonals) for the specified distance. The features include the angular second moment, contrast, correlation, sum of squares: variance, inverse difference moment, sum average, sum varience, sum entropy, entropy, difference variance, difference entropy, information measures of correlation 1, information measures of correlation 2, and maximum correlation coefficient. You can access the red channel contrast, for example, like this:

channelFeatures = GetImageChannelFeatures(1);
contrast = channelFeatures[RedChannel].Contrast[0];

func (*MagickWand) GetImageChannelKurtosis Uses

func (mw *MagickWand) GetImageChannelKurtosis(channel ChannelType) (kurtosis, skewness float64, err error)

Gets the kurtosis and skewness of one or more image channels.

func (*MagickWand) GetImageChannelMean Uses

func (mw *MagickWand) GetImageChannelMean(channel ChannelType) (mean, stdev float64, err error)

Gets the mean and standard deviation of one or more image channels.

func (*MagickWand) GetImageChannelRange Uses

func (mw *MagickWand) GetImageChannelRange(channel ChannelType) (min, max float64, err error)

Gets the range for one or more image channels.

func (*MagickWand) GetImageChannelStatistics Uses

func (mw *MagickWand) GetImageChannelStatistics() []ChannelStatistics

Returns statistics for each channel in the image. The statistics include the channel depth, its minima and maxima, the mean, the standard deviation, the kurtosis and the skewness. You can access the red channel mean, for example, like this:

channelStatistics = wand.GetImageChannelStatistics()
redMean = channelStatistics[RedChannel].mean

func (*MagickWand) GetImageClipMask Uses

func (mw *MagickWand) GetImageClipMask() *MagickWand

Gets the image clip mask at the current image index.

func (*MagickWand) GetImageColormapColor Uses

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

Returns the color of the specified colormap index.

func (*MagickWand) GetImageColors Uses

func (mw *MagickWand) GetImageColors() uint

Gets the number of unique colors in the image.

func (*MagickWand) GetImageColorspace Uses

func (mw *MagickWand) GetImageColorspace() ColorspaceType

Gets the image colorspace.

func (*MagickWand) GetImageCompose Uses

func (mw *MagickWand) GetImageCompose() CompositeOperator

Returns the composite operator associated with the image.

func (*MagickWand) GetImageCompression Uses

func (mw *MagickWand) GetImageCompression() CompressionType

Gets the image compression.

func (*MagickWand) GetImageCompressionQuality Uses

func (mw *MagickWand) GetImageCompressionQuality() uint

Gets the image compression quality.

func (*MagickWand) GetImageDelay Uses

func (mw *MagickWand) GetImageDelay() uint

Gets the image delay.

func (*MagickWand) GetImageDepth Uses

func (mw *MagickWand) GetImageDepth() uint

Gets the image depth.

func (*MagickWand) GetImageDispose Uses

func (mw *MagickWand) GetImageDispose() DisposeType

Gets the image disposal method.

func (*MagickWand) GetImageDistortion Uses

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 Uses

func (mw *MagickWand) GetImageEndian() EndianType

Gets the image endian.

func (*MagickWand) GetImageFilename Uses

func (mw *MagickWand) GetImageFilename() string

Returns the filename of a particular image in a sequence.

func (*MagickWand) GetImageFormat Uses

func (mw *MagickWand) GetImageFormat() string

Returns the format of a particular image in a sequence.

func (*MagickWand) GetImageFromMagickWand Uses

func (mw *MagickWand) GetImageFromMagickWand() *Image

Returns the current image from the magick wand

func (*MagickWand) GetImageFuzz Uses

func (mw *MagickWand) GetImageFuzz() float64

Gets the image fuzz.

func (*MagickWand) GetImageGamma Uses

func (mw *MagickWand) GetImageGamma() float64

Gets the image gamma.

func (*MagickWand) GetImageGravity Uses

func (mw *MagickWand) GetImageGravity() GravityType

Gets the image gravity.

func (*MagickWand) GetImageGreenPrimary Uses

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

Returns the chromaticy green primary point.

x: the chromaticity green primary x-point.

y: the chromaticity green primary y-point.

func (*MagickWand) GetImageHeight Uses

func (mw *MagickWand) GetImageHeight() uint

Returns the image height.

func (*MagickWand) GetImageHistogram Uses

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 Uses

func (mw *MagickWand) GetImageInterlaceScheme() InterlaceType

Gets the image interlace scheme.

func (*MagickWand) GetImageInterpolateMethod Uses

func (mw *MagickWand) GetImageInterpolateMethod() InterpolatePixelMethod

Returns the interpolation method for the sepcified image.

func (*MagickWand) GetImageIterations Uses

func (mw *MagickWand) GetImageIterations() uint

Gets the image iterations.

func (*MagickWand) GetImageLength Uses

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

Returns the image length in bytes.

func (*MagickWand) GetImageMatteColor Uses

func (mw *MagickWand) GetImageMatteColor() (matteColor *PixelWand, err error)

Returns the image matte color.

func (*MagickWand) GetImageOrientation Uses

func (mw *MagickWand) GetImageOrientation() OrientationType

Returns the image orientation.

func (*MagickWand) GetImagePage Uses

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 Uses

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

Returns the color of the specified pixel.

func (*MagickWand) GetImageProfile Uses

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 Uses

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 Uses

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 Uses

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

Returns a value associated with the specified property.

func (*MagickWand) GetImageRedPrimary Uses

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

Returns the chromaticy red primary point.

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

func (*MagickWand) GetImageRegion Uses

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 Uses

func (mw *MagickWand) GetImageRenderingIntent() RenderingIntent

Gets the image rendering intent.

func (*MagickWand) GetImageResolution Uses

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

Gets the image X and Y resolution.

func (*MagickWand) GetImageScene Uses

func (mw *MagickWand) GetImageScene() uint

Gets the image scene.

func (*MagickWand) GetImageSignature Uses

func (mw *MagickWand) GetImageSignature() string

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

func (*MagickWand) GetImageTicksPerSecond Uses

func (mw *MagickWand) GetImageTicksPerSecond() uint

Gets the image ticks-per-second.

func (*MagickWand) GetImageTotalInkDensity Uses

func (mw *MagickWand) GetImageTotalInkDensity() float64

Gets the image total ink density.

func (*MagickWand) GetImageType Uses

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 Uses

func (mw *MagickWand) GetImageUnits() ResolutionType

Gets the image units of resolution.

func (*MagickWand) GetImageVirtualPixelMethod Uses

func (mw *MagickWand) GetImageVirtualPixelMethod() VirtualPixelMethod

Returns the virtual pixel method for the specified image.

func (*MagickWand) GetImageWhitePoint Uses

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

Returns the chromaticy white point.

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

func (*MagickWand) GetImageWidth Uses

func (mw *MagickWand) GetImageWidth() uint

Returns the image width.

func (*MagickWand) GetImagesBlob Uses

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 Uses

func (mw *MagickWand) GetInterlaceScheme() InterlaceType

Gets the wand interlace scheme.

func (*MagickWand) GetInterpolateMethod Uses

func (mw *MagickWand) GetInterpolateMethod() InterpolatePixelMethod

Gets the wand compression.

func (*MagickWand) GetIteratorIndex Uses

func (mw *MagickWand) GetIteratorIndex() uint

Returns the position of the iterator in the image list

func (*MagickWand) GetLastError Uses

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 Uses

func (mw *MagickWand) GetNumberImages() uint

Returns the number of images associated with a magick wand.

func (*MagickWand) GetOption Uses

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

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

func (*MagickWand) GetOptions Uses

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 Uses

func (mw *MagickWand) GetOrientation() OrientationType

Gets the wand orientation type.

func (*MagickWand) GetPage Uses

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

Returns the page geometry associated with the magick wand.

func (*MagickWand) GetPointsize Uses

func (mw *MagickWand) GetPointsize() float64

Returns the font pointsize associated with the MagickWand.

func (*MagickWand) GetResolution Uses

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

Gets the image X and Y resolution.

func (*MagickWand) GetSamplingFactors Uses

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

Gets the horizontal and vertical sampling factor.

func (*MagickWand) GetSize Uses

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

Returns the size associated with the magick wand.

func (*MagickWand) GetSizeOffset Uses

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

Returns the size offset associated with the magick wand.

func (*MagickWand) GetType Uses

func (mw *MagickWand) GetType() ImageType

Returns the wand type.

func (*MagickWand) HaldClutImage Uses

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) HaldClutImageChannel Uses

func (mw *MagickWand) HaldClutImageChannel(channel ChannelType, 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 Uses

func (mw *MagickWand) HasNextImage() bool

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

func (*MagickWand) HasPreviousImage Uses

func (mw *MagickWand) HasPreviousImage() bool

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

func (*MagickWand) IdentifyImage Uses

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 Uses

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

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

func (*MagickWand) ImportImagePixels Uses

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 Uses

func (mw *MagickWand) IncreaseCount()

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

func (*MagickWand) InverseFourierTransformImage Uses

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 Uses

func (mw *MagickWand) IsVerified() bool

Returns true if the wand is a verified magick wand

func (*MagickWand) LabelImage Uses

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

Adds a label to your image.

func (*MagickWand) LevelImage Uses

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) LevelImageChannel Uses

func (mw *MagickWand) LevelImageChannel(channel ChannelType, 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 Uses

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 Uses

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 Uses

func (mw *MagickWand) MagnifyImage() error

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

func (*MagickWand) MergeImageLayers Uses

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 Uses

func (mw *MagickWand) MinifyImage() error

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

func (*MagickWand) ModulateImage Uses

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 Uses

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 Uses

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 Uses

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) MorphologyImageChannel Uses

func (mw *MagickWand) MorphologyImageChannel(channel ChannelType, 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 Uses

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) MotionBlurImageChannel Uses

func (mw *MagickWand) MotionBlurImageChannel(channel ChannelType, 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 Uses

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) NegateImageChannel Uses

func (mw *MagickWand) NegateImageChannel(channel ChannelType, 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 Uses

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 Uses

func (mw *MagickWand) NewPixelIterator() *PixelIterator

Returns a new pixel iterator

mw: the magick wand to iterate on

func (*MagickWand) NewPixelRegionIterator Uses

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 Uses

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 Uses

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) NormalizeImageChannel Uses

func (mw *MagickWand) NormalizeImageChannel(channel ChannelType) error

Enhances the contrast of a color image's channel 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 Uses

func (mw *MagickWand) OilPaintImage(radius 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.

func (*MagickWand) OpaquePaintImage Uses

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) OpaquePaintImageChannel Uses

func (mw *MagickWand) OpaquePaintImageChannel(channel ChannelType, 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 Uses

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 Uses

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) OrderedPosterizeImage Uses

func (mw *MagickWand) OrderedPosterizeImage(thresholdMap string) error

Performs an ordered dither based on a number of pre-defined dithering threshold maps, but over multiple intensity levels, which can be different for different channels, according to the input arguments. thresholdMap: A string containing the name of the threshold dither map to use, followed by zero or more numbers representing the number of color levels tho dither between. Any level number less than 2 is equivalent to 2, and means only binary dithering will be applied to each color channel. No numbers also means a 2 level (bitmap) dither will be applied to all channels, while a single number is the number of levels applied to each channel in sequence. More numbers will be applied in turn to each of the color channels. For example: "o3x3,6" generates a 6 level posterization of the image with a ordered 3x3 diffused pixel dither being applied between each level. While checker,8,8,4 will produce a 332 colormaped image with only a single checkerboard hash pattern (50 grey) between each color level, to basically double the number of color levels with a bare minimim of dithering.

func (*MagickWand) OrderedPosterizeImageChannel Uses

func (mw *MagickWand) OrderedPosterizeImageChannel(channel ChannelType, thresholdMap string) error

Performs an ordered dither based on a number of pre-defined dithering threshold maps, but over multiple intensity levels, which can be different for different channels, according to the input arguments. thresholdMap: A string containing the name of the threshold dither map to use, followed by zero or more numbers representing the number of color levels tho dither between. Any level number less than 2 is equivalent to 2, and means only binary dithering will be applied to each color channel. No numbers also means a 2 level (bitmap) dither will be applied to all channels, while a single number is the number of levels applied to each channel in sequence. More numbers will be applied in turn to each of the color channels. For example: "o3x3,6" generates a 6 level posterization of the image with a ordered 3x3 diffused pixel dither being applied between each level. While checker,8,8,4 will produce a 332 colormaped image with only a single checkerboard hash pattern (50 grey) between each color level, to basically double the number of color levels with a bare minimim of dithering.

func (*MagickWand) PingImage Uses

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 Uses

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

Pings an image or image sequence from a blob.

func (*MagickWand) PingImageFile Uses

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

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

func (*MagickWand) PolaroidImage Uses

func (mw *MagickWand) PolaroidImage(dw *DrawingWand, angle float64) error

Simulates a Polaroid picture.

func (*MagickWand) PosterizeImage Uses

func (mw *MagickWand) PosterizeImage(levels uint, dither bool) 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: Set this integer value to something other than zero to dither the mapped image.

func (*MagickWand) PreviewImages Uses

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 Uses

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 Uses

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 Uses

func (mw *MagickWand) QuantizeImage(numColors uint, colorspace ColorspaceType, treedepth uint, dither bool, 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: A value other than zero distributes the difference between an original image and the corresponding color reduced image to neighboring pixels along a Hilbert curve.

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 Uses

func (mw *MagickWand) QuantizeImages(numColors uint, colorspace ColorspaceType, treedepth uint, dither bool, 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: A value other than zero distributes the difference between an original image and the corresponding color reduced image to neighboring pixels along a Hilbert curve.

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 Uses

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

Returns the value associated with the specified configure option

func (*MagickWand) QueryConfigureOptions Uses

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 Uses

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

Returns a FontMetrics struct

func (*MagickWand) QueryFonts Uses

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

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

func (*MagickWand) QueryFormats Uses

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 Uses

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

Returns a FontMetrics struct related to the multiline text

func (*MagickWand) RadialBlurImage Uses

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

Radial blurs an image.

angle: the angle of the blur in degrees.

func (*MagickWand) RadialBlurImageChannel Uses

func (mw *MagickWand) RadialBlurImageChannel(channel ChannelType, angle float64) error

Radial blurs an image's channel

angle: the angle of the blur in degrees.

func (*MagickWand) RaiseImage Uses

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 Uses

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) RandomThresholdImageChannel Uses

func (mw *MagickWand) RandomThresholdImageChannel(channel ChannelType, 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 Uses

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 Uses

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

Reads an image or image sequence from a blob.

func (*MagickWand) ReadImageFile Uses

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

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

func (*MagickWand) RemapImage Uses

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 Uses

func (mw *MagickWand) RemoveImage() error

Removes an image from the image list.

func (*MagickWand) RemoveImageProfile Uses

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 Uses

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

Resample image to desired resolution.

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

filter: Image filter to use.

blur: the blur factor where > 1 is blurry, < 1 is sharp.

func (*MagickWand) ResetImagePage Uses

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

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

func (*MagickWand) ResetIterator Uses

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 Uses

func (mw *MagickWand) ResizeImage(cols, rows uint, filter FilterType, blur float64) 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.

blur: the blur factor where > 1 is blurry, < 1 is sharp.

func (*MagickWand) RollImage Uses

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 Uses

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 Uses

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 Uses

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

Scales the size of an image to the given dimensions.

func (*MagickWand) SegmentImage Uses

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 Uses

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) SelectiveBlurImageChannel Uses

func (mw *MagickWand) SelectiveBlurImageChannel(channel ChannelType, radius, sigma, threshold float64) error

Selectively blur an image's channel 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) SeparateImageChannel Uses

func (mw *MagickWand) SeparateImageChannel(channel ChannelType) error

Separates a channel from the image and returns a grayscale image. A channel is a particular color component of each pixel in the image.

func (*MagickWand) SepiaToneImage Uses

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 Uses

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

Sets the antialias propery of the wand.

func (*MagickWand) SetBackgroundColor Uses

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

Sets the wand background color.

func (*MagickWand) SetColorspace Uses

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

Sets the wand colorspace type.

func (*MagickWand) SetCompression Uses

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

Sets the wand compression type.

func (*MagickWand) SetCompressionQuality Uses

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

Sets the wand compression quality.

func (*MagickWand) SetDepth Uses

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

Sets the wand pixel depth.

func (*MagickWand) SetExtract Uses

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 Uses

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

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

func (*MagickWand) SetFirstIterator Uses

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 Uses

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

Sets the font associated with the MagickWand.

func (*MagickWand) SetFormat Uses

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

Sets the format of the magick wand.

func (*MagickWand) SetGravity Uses

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

Sets the gravity type.

func (*MagickWand) SetImage Uses

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 Uses

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

Activates, deactivates, resets, or sets the alpha channel.

func (*MagickWand) SetImageArtifact Uses

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

Associates a artifact with an image.

func (*MagickWand) SetImageBackgroundColor Uses

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

Sets the image background color.

func (*MagickWand) SetImageBias Uses

func (mw *MagickWand) SetImageBias(bias float64) error

Sets the image bias for any method that convolves an image (e.g. ConvolveImage()).

func (*MagickWand) SetImageBluePrimary Uses

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

Sets the image chromaticity blue primary point.

func (*MagickWand) SetImageBorderColor Uses

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

Sets the image border color.

func (*MagickWand) SetImageChannelDepth Uses

func (mw *MagickWand) SetImageChannelDepth(channel ChannelType, depth uint) error

Sets the depth of a particular image channel.

depth: the image depth in bits.

func (*MagickWand) SetImageClipMask Uses

func (mw *MagickWand) SetImageClipMask(clipmask *MagickWand) error

Sets image clip mask.

func (*MagickWand) SetImageColor Uses

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

Set the entire wand canvas to the specified color.

func (*MagickWand) SetImageColormapColor Uses

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 Uses

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

Sets the image colorspace.

func (*MagickWand) SetImageCompose Uses

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 Uses

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

Sets the image compression.

func (*MagickWand) SetImageCompressionQuality Uses

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

Sets the image compression quality.

func (*MagickWand) SetImageDelay Uses

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

Sets the image delay.

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

func (*MagickWand) SetImageDepth Uses

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

Sets the image depth.

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

func (*MagickWand) SetImageDispose Uses

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

Sets the image disposal method.

func (*MagickWand) SetImageEndian Uses

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

Sets the image endian method.

func (*MagickWand) SetImageExtent Uses

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 Uses

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

Sets the filename of a particular image in a sequence.

func (*MagickWand) SetImageFormat Uses

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

Sets the format of a particular image in a sequence.

format: the image format.

func (*MagickWand) SetImageFuzz Uses

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

Sets the image fuzz.

func (*MagickWand) SetImageGamma Uses

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

Sets the image gamma.

func (*MagickWand) SetImageGravity Uses

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

Sets the image gravity type.

func (*MagickWand) SetImageGreenPrimary Uses

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

Sets the image chromaticity green primary point.

func (*MagickWand) SetImageInterlaceScheme Uses

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

Sets the image interlace scheme.

func (*MagickWand) SetImageInterpolateMethod Uses

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

Sets the image interpolate pixel method.

func (*MagickWand) SetImageIterations Uses

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

Sets the image iterations.

func (*MagickWand) SetImageMatte Uses

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

Sets the image matte channel.

func (*MagickWand) SetImageMatteColor Uses

func (mw *MagickWand) SetImageMatteColor(matte *PixelWand) error

Sets the image matte color.

func (*MagickWand) SetImageOpacity Uses

func (mw *MagickWand) SetImageOpacity(alpha float64) error

Sets the image to the specified opacity level.

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

func (*MagickWand) SetImageOrientation Uses

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

Sets the image orientation.

func (*MagickWand) SetImagePage Uses

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

Sets the page geometry of the image.

func (*MagickWand) SetImageProfile Uses

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 Uses

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

Associates a property with an image.

func (*MagickWand) SetImageRedPrimary Uses

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

Sets the image chromaticity red primary point.

func (*MagickWand) SetImageRenderingIntent Uses

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

Sets the image rendering intent.

func (*MagickWand) SetImageResolution Uses

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

Sets the image resolution.

func (*MagickWand) SetImageScene Uses

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

Sets the image scene.

func (*MagickWand) SetImageTicksPerSecond Uses

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

Sets the image ticks-per-second.

func (*MagickWand) SetImageType Uses

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

Sets the image type.

func (*MagickWand) SetImageUnits Uses

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

Sets the image units of resolution.

func (*MagickWand) SetImageVirtualPixelMethod Uses

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

Sets the image virtual pixel method.

func (*MagickWand) SetImageWhitePoint Uses

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

Sets the image chromaticity white point.

func (*MagickWand) SetInterlaceScheme Uses

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

Sets the image interlacing scheme

func (*MagickWand) SetInterpolateMethod Uses

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

Sets the interpolate pixel method.

func (*MagickWand) SetIteratorIndex Uses

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 Uses

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 Uses

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 Uses

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

Sets the wand orientation type.

func (*MagickWand) SetPage Uses

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

Sets the page geometry of the magick wand.

func (*MagickWand) SetPassphrase Uses

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

Sets the passphrase.

func (*MagickWand) SetPointsize Uses

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

Sets the font pointsize associated with the MagickWand.

func (*MagickWand) SetResolution Uses

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

Sets the image resolution.

func (*MagickWand) SetResourceLimit Uses

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

Sets the limit for a particular resource in megabytes.

func (*MagickWand) SetSamplingFactors Uses

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 Uses

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 Uses

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 Uses

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

Sets the image type attribute.

func (*MagickWand) ShadeImage Uses

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 Uses

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 Uses

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) SharpenImageChannel Uses

func (mw *MagickWand) SharpenImageChannel(channel ChannelType, radius, sigma float64) error

Sharpens an image's channel. 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 Uses

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 Uses

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 Uses

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) SigmoidalContrastImageChannel Uses

func (mw *MagickWand) SigmoidalContrastImageChannel(channel ChannelType, sharpen bool, alpha, beta float64) error

Adjusts the contrast of an image's channel 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 Uses

func (mw *MagickWand) SimilarityImage(reference *MagickWand) (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.

similarity: the computed similarity between the images.

func (*MagickWand) SketchImage Uses

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 Uses

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 Uses

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 Uses

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 Uses

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

Splices a solid color into the image.

func (*MagickWand) SpreadImage Uses

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

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

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

func (*MagickWand) StatisticImage Uses

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) StatisticImageChannel Uses

func (mw *MagickWand) StatisticImageChannel(channel ChannelType, 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 Uses

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 Uses

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 Uses

func (mw *MagickWand) StripImage() error

Strips an image of all profiles and comments.

func (*MagickWand) SwirlImage Uses

func (mw *MagickWand) SwirlImage(degrees float64) 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.

func (*MagickWand) TextureImage Uses

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

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

func (*MagickWand) ThresholdImage Uses

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 Uses

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 Uses

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 Uses

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) TransformImage Uses

func (mw *MagickWand) TransformImage(crop string, geometry string) *MagickWand

Is a convenience method that behaves like ResizeImage() or CropImage() but accepts scaling and/or cropping information as a region geometry specification. If the operation fails, a NULL image handle is returned. crop: a crop geometry string. This geometry defines a subregion of the image to crop. geometry: an image geometry string. This geometry defines the final size of the image.

func (*MagickWand) TransformImageColorspace Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

func (mw *MagickWand) UniqueImageColors() error

Discards all but one of any pixel color.

func (*MagickWand) UnsharpMaskImage Uses

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) UnsharpMaskImageChannel Uses

func (mw *MagickWand) UnsharpMaskImageChannel(channel ChannelType, radius, sigma, amount, threshold float64) error

Unsharpens an image's channel. 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 Uses

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 Uses

func (mw *MagickWand) WaveImage(amplitude, wavelength float64) 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.

func (*MagickWand) WhiteThresholdImage Uses

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 Uses

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

Writes an image to the specified filename.

func (*MagickWand) WriteImageFile Uses

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

Writes an image to an open file descriptor.

func (*MagickWand) WriteImages Uses

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

Writes an image or image sequence.

func (*MagickWand) WriteImagesFile Uses

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

Writes an image sequence to an open file descriptor.

type MagickWandException Uses

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

func (*MagickWandException) Error Uses

func (mwe *MagickWandException) Error() string

type MetricType Uses

type MetricType int
const (
    METRIC_UNDEFINED                          MetricType = C.UndefinedMetric
    METRIC_ABSOLUTE_ERROR                     MetricType = C.AbsoluteErrorMetric
    METRIC_MEAN_ABSOLUTE_ERROR                MetricType = C.MeanAbsoluteErrorMetric
    METRIC_MEAN_ERROR_PER_PIXEL               MetricType = C.MeanErrorPerPixelMetric
    METRIC_MEAN_SQUARED_ERROR                 MetricType = C.MeanSquaredErrorMetric
    METRIC_PEAK_ABSOLUTE_ERROR                MetricType = C.PeakAbsoluteErrorMetric
    METRIC_PEAK_SIGNAL_TO_NOISE_RATIO         MetricType = C.PeakSignalToNoiseRatioMetric
    METRIC_ROOT_MEAN_SQUARED_ERROR            MetricType = C.RootMeanSquaredErrorMetric
    METRIC_NORMALIZED_CROSS_CORRELATION_ERROR MetricType = C.NormalizedCrossCorrelationErrorMetric
    METRIC_FUZZ_ERROR                         MetricType = C.FuzzErrorMetric
)

type MontageMode Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 PixelIterator Uses

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

func (*PixelIterator) Clear Uses

func (pi *PixelIterator) Clear()

Clear resources associated with a PixelIterator.

func (*PixelIterator) Clone Uses

func (pi *PixelIterator) Clone() *PixelIterator

Makes an exact copy of the specified iterator.

func (*PixelIterator) DecreaseCount Uses

func (pi *PixelIterator) DecreaseCount()

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

func (*PixelIterator) Destroy Uses

func (pi *PixelIterator) Destroy()

Deallocates resources associated with a PixelIterator.

func (*PixelIterator) GetCurrentIteratorRow Uses

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

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

func (*PixelIterator) GetIteratorRow Uses

func (pi *PixelIterator) GetIteratorRow() int

Returns the current pixel iterator row.

func (*PixelIterator) GetLastError Uses

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 Uses

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

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

func (*PixelIterator) GetPreviousIteratorRow Uses

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

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

func (*PixelIterator) IncreaseCount Uses

func (pi *PixelIterator) IncreaseCount()

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

func (*PixelIterator) IsVerified Uses

func (pi *PixelIterator) IsVerified() bool

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

func (*PixelIterator) Reset Uses

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 Uses

func (pi *PixelIterator) SetFirstIteratorRow()

Sets the pixel iterator to the first pixel row.

func (*PixelIterator) SetIteratorRow Uses

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

Set the pixel iterator row.

func (*PixelIterator) SetLastIteratorRow Uses

func (pi *PixelIterator) SetLastIteratorRow()

Sets the pixel iterator to the last pixel row.

func (*PixelIterator) SyncIterator Uses

func (pi *PixelIterator) SyncIterator() error

Syncs the pixel iterator.

type PixelIteratorException Uses

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

func (*PixelIteratorException) Error Uses

func (pie *PixelIteratorException) Error() string

type PixelPacket Uses

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

type PixelWand Uses

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

func NewPixelWand Uses

func NewPixelWand() *PixelWand

Returns a new pixel wand

func (*PixelWand) Clear Uses

func (pw *PixelWand) Clear()

Clears resources associated with the wand

func (*PixelWand) Clone Uses

func (pw *PixelWand) Clone() *PixelWand

Makes an exact copy of the wand

func (*PixelWand) DecreaseCount Uses

func (pw *PixelWand) DecreaseCount()

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

func (*PixelWand) Destroy Uses

func (pw *PixelWand) Destroy()

Deallocates resources associated with a pixel wand

func (*PixelWand) GetAlpha Uses

func (pw *PixelWand) GetAlpha() float64

Returns the normalized alpha color of the pixel wand

func (*PixelWand) GetAlphaQuantum Uses

func (pw *PixelWand) GetAlphaQuantum() Quantum

Returns the alpha value of the pixel wand

func (*PixelWand) GetBlack Uses

func (pw *PixelWand) GetBlack() float64

Returns the normalized black color of the pixel wand

func (*PixelWand) GetBlackQuantum Uses

func (pw *PixelWand) GetBlackQuantum() Quantum

Returns the black color of the pixel wand

func (*PixelWand) GetBlue Uses

func (pw *PixelWand) GetBlue() float64

Returns the normalized blue color of the pixel wand

func (*PixelWand) GetBlueQuantum Uses

func (pw *PixelWand) GetBlueQuantum() Quantum

Returns the blue color of the pixel wand

func (*PixelWand) GetColorAsNormalizedString Uses

func (pw *PixelWand) GetColorAsNormalizedString() string

Returns the normalized color of the pixel wand as string

func (*PixelWand) GetColorAsString Uses

func (pw *PixelWand) GetColorAsString() string

Returns the color of the pixel wand as a string

func (*PixelWand) GetColorCount Uses

func (pw *PixelWand) GetColorCount() uint

Returns the color count associated with this color

func (*PixelWand) GetCyan Uses

func (pw *PixelWand) GetCyan() float64

Returns the normalized cyan color of the pixel wand

func (*PixelWand) GetCyanQuantum Uses

func (pw *PixelWand) GetCyanQuantum() Quantum

Returns the cyan color of the pixel wand

func (*PixelWand) GetFuzz Uses

func (pw *PixelWand) GetFuzz() float64

Returns the normalized fuzz value of the pixel wand

func (*PixelWand) GetGreen Uses

func (pw *PixelWand) GetGreen() float64

Returns the normalized green color of the pixel wand

func (*PixelWand) GetGreenQuantum Uses

func (pw *PixelWand) GetGreenQuantum() Quantum

Returns the green color of the pixel wand

func (*PixelWand) GetHSL Uses

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

Returns the normalized HSL color of the pixel wand

func (*PixelWand) GetIndex Uses

func (pw *PixelWand) GetIndex() IndexPacket

Returns the colormap index from the pixel wand

func (*PixelWand) GetLastError Uses

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 Uses

func (pw *PixelWand) GetMagenta() float64

Returns the normalized magenta color of the pixel wand

func (*PixelWand) GetMagentaQuantum Uses

func (pw *PixelWand) GetMagentaQuantum() Quantum

Returns the magenta color of the pixel wand

func (*PixelWand) GetMagickColor Uses

func (pw *PixelWand) GetMagickColor() *MagickPixelPacket

Gets the magick color of the pixel wand

func (*PixelWand) GetOpacity Uses

func (pw *PixelWand) GetOpacity() float64

Returns the normalized opacity color of the pixel wand

func (*PixelWand) GetOpacityQuantum Uses

func (pw *PixelWand) GetOpacityQuantum() Quantum

Returns the opacity color of the pixel wand

func (*PixelWand) GetQuantumColor Uses

func (pw *PixelWand) GetQuantumColor() *PixelPacket

Gets the color of the pixel wand as a PixelPacket

func (*PixelWand) GetRed Uses

func (pw *PixelWand) GetRed() float64

Returns the normalized red color of the pixel wand

func (*PixelWand) GetRedQuantum Uses

func (pw *PixelWand) GetRedQuantum() Quantum

Returns the red color of the pixel wand

func (*PixelWand) GetYellow Uses

func (pw *PixelWand) GetYellow() float64

Returns the normalized yellow color of the pixel wand

func (*PixelWand) GetYellowQuantum Uses

func (pw *PixelWand) GetYellowQuantum() Quantum

Returns the yellow color of the pixel wand

func (*PixelWand) IncreaseCount Uses

func (pw *PixelWand) IncreaseCount()

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

func (*PixelWand) IsSimilar Uses

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 Uses

func (pw *PixelWand) IsVerified() bool

Returns true if the wand is verified as a pixel wand

func (*PixelWand) SetAlpha Uses

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 Uses

func (pw *PixelWand) SetAlphaQuantum(opacity Quantum)

Sets the alpha color of the pixel wand

func (*PixelWand) SetBlack Uses

func (pw *PixelWand) SetBlack(black float64)

Sets the normalized black color of the pixel wand

func (*PixelWand) SetBlackQuantum Uses

func (pw *PixelWand) SetBlackQuantum(black Quantum)

Sets the black color of the pixel wand

func (*PixelWand) SetBlue Uses

func (pw *PixelWand) SetBlue(blue float64)

Sets the normalized blue color of the pixel wand

func (*PixelWand) SetBlueQuantum Uses

func (pw *PixelWand) SetBlueQuantum(blue Quantum)

Sets the blue color of the pixel wand

func (*PixelWand) SetColor Uses

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 Uses

func (pw *PixelWand) SetColorCount(count uint)

Sets the color count of the pixel wand

func (*PixelWand) SetColorFromWand Uses

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

Sets the color of the pixel wand from another one

func (*PixelWand) SetCyan Uses

func (pw *PixelWand) SetCyan(cyan float64)

Sets the normalized cyan color of the pixel wand

func (*PixelWand) SetCyanQuantum Uses

func (pw *PixelWand) SetCyanQuantum(cyan Quantum)

Sets the cyan color of the pixel wand

func (*PixelWand) SetFuzz Uses

func (pw *PixelWand) SetFuzz(fuzz float64)

Sets the fuzz value of the pixel wand

func (*PixelWand) SetGreen Uses

func (pw *PixelWand) SetGreen(green float64)

Sets the normalized green color of the pixel wand

func (*PixelWand) SetGreenQuantum Uses

func (pw *PixelWand) SetGreenQuantum(green Quantum)

Sets the green color of the pixel wand

func (*PixelWand) SetHSL Uses

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

Sets the normalized HSL color of the pixel wand

func (*PixelWand) SetIndex Uses

func (pw *PixelWand) SetIndex(index *IndexPacket)

Sets the colormap index of the pixel wand

func (*PixelWand) SetMagenta Uses

func (pw *PixelWand) SetMagenta(magenta float64)

Sets the normalized magenta color of the pixel wand

func (*PixelWand) SetMagentaQuantum Uses

func (pw *PixelWand) SetMagentaQuantum(magenta Quantum)

Sets the magenta color of the pixel wand

func (*PixelWand) SetMagickColor Uses

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

Sets the color of the pixel wand

func (*PixelWand) SetOpacity Uses

func (pw *PixelWand) SetOpacity(opacity float64)

Sets the normalized opacity color of the pixel wand

func (*PixelWand) SetOpacityQuantum Uses

func (pw *PixelWand) SetOpacityQuantum(opacity Quantum)

Sets the opacity color of the pixel wand

func (*PixelWand) SetQuantumColor Uses

func (pw *PixelWand) SetQuantumColor(color *PixelPacket)

Sets the color of the pixel wand

func (*PixelWand) SetRed Uses

func (pw *PixelWand) SetRed(red float64)

Sets the normalized red color of the pixel wand

func (*PixelWand) SetRedQuantum Uses

func (pw *PixelWand) SetRedQuantum(red Quantum)

Sets the red color of the pixel wand

func (*PixelWand) SetYellow Uses

func (pw *PixelWand) SetYellow(yellow float64)

Sets the normalized yellow color of the pixel wand

func (*PixelWand) SetYellowQuantum Uses

func (pw *PixelWand) SetYellowQuantum(yellow Quantum)

Sets the yellow color of the pixel wand

type PixelWandException Uses

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

func (*PixelWandException) Error Uses

func (pwe *PixelWandException) Error() string

type PointInfo Uses

type PointInfo struct {
    X   float64
    Y   float64
}

type PreviewType Uses

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 Uses

type Quantum C.Quantum

func ConvertHSBToRGB Uses

func ConvertHSBToRGB(fh, fs, fb float64) (r, g, b Quantum)

func ConvertHSLToRGB Uses

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

type RectangleInfo Uses

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

type RenderingIntent Uses

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 Uses

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 Uses

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
    RESOURCE_WIDTH     ResourceType = C.WidthResource
    RESOURCE_HEIGHT    ResourceType = C.HeightResource
)

type SparseColorMethod Uses

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 Uses

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 Uses

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_INTEGER   StorageType = C.IntegerPixel
    PIXEL_LONG      StorageType = C.LongPixel
    PIXEL_QUANTUM   StorageType = C.QuantumPixel
    PIXEL_SHORT     StorageType = C.ShortPixel
)

type StretchType Uses

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 Uses

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 Uses

type VirtualPixelMethod int
const (
    VIRTUAL_PIXEL_UNDEFINED            VirtualPixelMethod = C.UndefinedVirtualPixelMethod
    VIRTUAL_PIXEL_BACKGROUND           VirtualPixelMethod = C.BackgroundVirtualPixelMethod
    VIRTUAL_PIXEL_CONSTANT             VirtualPixelMethod = C.ConstantVirtualPixelMethod
    VIRTUAL_PIXEL_DITHER               VirtualPixelMethod = C.DitherVirtualPixelMethod
    VIRTUAL_PIXEL_EDGE                 VirtualPixelMethod = C.EdgeVirtualPixelMethod
    VIRTUAL_PIXEL_MIRROR               VirtualPixelMethod = C.MirrorVirtualPixelMethod
    VIRTUAL_PIXEL_RANDOM               VirtualPixelMethod = C.RandomVirtualPixelMethod
    VIRTUAL_PIXEL_TILE                 VirtualPixelMethod = C.TileVirtualPixelMethod
    VIRTUAL_PIXEL_TRANSPARENT          VirtualPixelMethod = C.TransparentVirtualPixelMethod
    VIRTUAL_PIXEL_MASK                 VirtualPixelMethod = C.MaskVirtualPixelMethod
    VIRTUAL_PIXEL_BLACK                VirtualPixelMethod = C.BlackVirtualPixelMethod
    VIRTUAL_PIXEL_GRAY                 VirtualPixelMethod = C.GrayVirtualPixelMethod
    VIRTUAL_PIXEL_WHITE                VirtualPixelMethod = C.WhiteVirtualPixelMethod
    VIRTUAL_PIXEL_HORIZONTAL_TILE      VirtualPixelMethod = C.HorizontalTileVirtualPixelMethod
    VIRTUAL_PIXEL_VERTICAL_TILE        VirtualPixelMethod = C.VerticalTileVirtualPixelMethod
    VIRTUAL_PIXEL_HORIZONTAL_TILE_EDGE VirtualPixelMethod = C.HorizontalTileEdgeVirtualPixelMethod
    VIRTUAL_PIXEL_VERTICAL_TILE_EDGE   VirtualPixelMethod = C.VerticalTileEdgeVirtualPixelMethod
    VIRTUAL_PIXEL_CHECKER_TILE         VirtualPixelMethod = C.CheckerTileVirtualPixelMethod
)

Directories

PathSynopsis
types

Package imagick imports 11 packages (graph) and is imported by 8 packages. Updated 2018-10-03. Refresh now. Tools for package owners.