Documentation
¶
Overview ¶
Minimal binding of imagemagick for using in github.com/vanng822/imgscale/imgscale
Index ¶
- func GetResourceLimit(resourceType ResourceType) int64
- func GetVersion() (string, uint)
- func Initialize()
- func SetResourceLimit(resourceType ResourceType, limit int64) bool
- func Terminate()
- type BooleanType
- type CompositeOperator
- type ExceptionType
- type MagickWand
- func (mw *MagickWand) CommentImage(comment string) error
- func (mw *MagickWand) CompositeImage(source *MagickWand, compose CompositeOperator, x, y int) error
- func (mw *MagickWand) CropImage(width, height uint, x, y int) error
- func (mw *MagickWand) Destroy()
- func (mw *MagickWand) FlipImage() error
- func (mw *MagickWand) FlopImage() error
- func (mw *MagickWand) GetImageBlob() []byte
- func (mw *MagickWand) GetImageHeight() uint
- func (mw *MagickWand) GetImageMimeType() string
- func (mw *MagickWand) GetImageOrientation() OrientationType
- func (mw *MagickWand) GetImageProperties(pattern string) (properties []string)
- func (mw *MagickWand) GetImageProperty(property string) string
- func (mw *MagickWand) GetImagePropertyValues(pattern string) map[string]string
- func (mw *MagickWand) GetImageWidth() uint
- func (mw *MagickWand) GetLastError() error
- func (mw *MagickWand) IdentifyImage() string
- func (mw *MagickWand) ReadImage(filename string) error
- func (mw *MagickWand) ReadImageBlob(blob []byte) error
- func (mw *MagickWand) RotateImage(background *PixelWand, degrees float64) error
- func (mw *MagickWand) ScaleImage(cols, rows uint) error
- func (mw *MagickWand) SetImageCompressionQuality(quality uint) error
- func (mw *MagickWand) SetImageOrientation(orientation OrientationType) error
- func (mw *MagickWand) StripImage() error
- func (mw *MagickWand) ThumbnailImage(cols, rows uint) error
- type MagickWandException
- type OrientationType
- type PixelWand
- type ResourceType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetResourceLimit ¶
func GetResourceLimit(resourceType ResourceType) int64
Returns the specified resource limit in megabytes.
func GetVersion ¶
func Initialize ¶
func Initialize()
func SetResourceLimit ¶
func SetResourceLimit(resourceType ResourceType, limit int64) bool
Types ¶
type BooleanType ¶
type BooleanType int
const ( BOOLEAN_TYPE_FALSE BooleanType = C.MagickFalse BOOLEAN_TYPE_TRUE BooleanType = C.MagickTrue )
func (*BooleanType) GoBool ¶
func (b *BooleanType) GoBool() bool
func (*BooleanType) True ¶
func (b *BooleanType) True() bool
type CompositeOperator ¶
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 ExceptionType ¶
type ExceptionType int
const ( EXCEPTION_UNDEFINED ExceptionType = C.UndefinedException EXCEPTION_WARNING ExceptionType = C.WarningException WARNING_RESOURCE_LIMIT ExceptionType = C.ResourceLimitWarning WARNING_TYPE ExceptionType = C.TypeWarning WARNING_OPTION ExceptionType = C.OptionWarning WARNING_DELEGATE ExceptionType = C.DelegateWarning WARNING_MISSING_DELEGATE ExceptionType = C.MissingDelegateWarning WARNING_CORRUPT_IMAGE ExceptionType = C.CorruptImageWarning WARNING_FILE_OPEN ExceptionType = C.FileOpenWarning WARNING_BLOB ExceptionType = C.BlobWarning WARNING_STREAM ExceptionType = C.StreamWarning WARNING_CACHE ExceptionType = C.CacheWarning WARNING_CODER ExceptionType = C.CoderWarning WARNING_FILTER ExceptionType = C.FilterWarning WARNING_MODULE ExceptionType = C.ModuleWarning WARNING_DRAW ExceptionType = C.DrawWarning WARNING_IMAGE ExceptionType = C.ImageWarning WARNING_WAND ExceptionType = C.WandWarning WARNING_RANDOM ExceptionType = C.RandomWarning WARNING_XSERVER ExceptionType = C.XServerWarning WARNING_MONITOR ExceptionType = C.MonitorWarning WARNING_REGISTRY ExceptionType = C.RegistryWarning WARNING_CONFIGURE ExceptionType = C.ConfigureWarning WARNING_POLICY ExceptionType = C.PolicyWarning EXCEPTION_ERROR ExceptionType = C.ErrorException ERROR_RESOURCE_LIMIT ExceptionType = C.ResourceLimitError ERROR_TYPE ExceptionType = C.TypeError ERROR_OPTION ExceptionType = C.OptionError ERROR_DELEGATE ExceptionType = C.DelegateError ERROR_MISSING_DELEGATE ExceptionType = C.MissingDelegateError ERROR_CORRUPT_IMAGE ExceptionType = C.CorruptImageError ERROR_FILE_OPEN ExceptionType = C.FileOpenError ERROR_BLOB ExceptionType = C.BlobError ERROR_STREAM ExceptionType = C.StreamError ERROR_CACHE ExceptionType = C.CacheError ERROR_CODER ExceptionType = C.CoderError ERROR_FILTER ExceptionType = C.FilterError ERROR_MODULE ExceptionType = C.ModuleError ERROR_DRAW ExceptionType = C.DrawError ERROR_IMAGE ExceptionType = C.ImageError ERROR_WAND ExceptionType = C.WandError ERROR_RANDOM ExceptionType = C.RandomError ERROR_XSERVER ExceptionType = C.XServerError ERROR_MONITOR ExceptionType = C.MonitorError ERROR_REGISTRY ExceptionType = C.RegistryError ERROR_CONFIGURE ExceptionType = C.ConfigureError ERROR_POLICY ExceptionType = C.PolicyError EXCEPTION_FATAL_ERROR ExceptionType = C.FatalErrorException FATAL_ERROR_RESOURCE_LIMIT ExceptionType = C.ResourceLimitFatalError FATAL_ERROR_TYPE ExceptionType = C.TypeFatalError FATAL_ERROR_OPTION ExceptionType = C.OptionFatalError FATAL_ERROR_DELEGATE ExceptionType = C.DelegateFatalError FATAL_ERROR_MISSING_DELEGATE ExceptionType = C.MissingDelegateFatalError FATAL_ERROR_CORRUPT_IMAGE ExceptionType = C.CorruptImageFatalError FATAL_ERROR_FILE_OPEN ExceptionType = C.FileOpenFatalError FATAL_ERROR_BLOB ExceptionType = C.BlobFatalError FATAL_ERROR_STREAM ExceptionType = C.StreamFatalError FATAL_ERROR_CACHE ExceptionType = C.CacheFatalError FATAL_ERROR_CODER ExceptionType = C.CoderFatalError FATAL_ERROR_FILTER ExceptionType = C.FilterFatalError FATAL_ERROR_MODULE ExceptionType = C.ModuleFatalError FATAL_ERROR_DRAW ExceptionType = C.DrawFatalError FATAL_ERROR_IMAGE ExceptionType = C.ImageFatalError FATAL_ERROR_WAND ExceptionType = C.WandFatalError FATAL_ERROR_RANDOM ExceptionType = C.RandomFatalError FATAL_ERROR_XSERVER ExceptionType = C.XServerFatalError FATAL_ERROR_MONITOR ExceptionType = C.MonitorFatalError FATAL_ERROR_REGISTRY ExceptionType = C.RegistryFatalError FATAL_ERROR_CONFIGURE ExceptionType = C.ConfigureFatalError FATAL_ERROR_POLICY ExceptionType = C.PolicyFatalError )
func (*ExceptionType) String ¶
func (exceptionType *ExceptionType) String() string
type MagickWand ¶
type MagickWand struct {
// contains filtered or unexported fields
}
func NewMagickWand ¶
func NewMagickWand() *MagickWand
func (*MagickWand) CommentImage ¶
func (mw *MagickWand) CommentImage(comment string) error
func (*MagickWand) CompositeImage ¶
func (mw *MagickWand) CompositeImage(source *MagickWand, compose CompositeOperator, x, y int) error
func (*MagickWand) Destroy ¶
func (mw *MagickWand) Destroy()
func (*MagickWand) FlipImage ¶
func (mw *MagickWand) FlipImage() error
func (*MagickWand) FlopImage ¶
func (mw *MagickWand) FlopImage() error
func (*MagickWand) GetImageBlob ¶
func (mw *MagickWand) GetImageBlob() []byte
func (*MagickWand) GetImageHeight ¶
func (mw *MagickWand) GetImageHeight() uint
func (*MagickWand) GetImageMimeType ¶
func (mw *MagickWand) GetImageMimeType() string
func (*MagickWand) GetImageOrientation ¶
func (mw *MagickWand) GetImageOrientation() OrientationType
func (*MagickWand) GetImageProperties ¶
func (mw *MagickWand) GetImageProperties(pattern string) (properties []string)
func (*MagickWand) GetImageProperty ¶
func (mw *MagickWand) GetImageProperty(property string) string
func (*MagickWand) GetImagePropertyValues ¶
func (mw *MagickWand) GetImagePropertyValues(pattern string) map[string]string
func (*MagickWand) GetImageWidth ¶
func (mw *MagickWand) GetImageWidth() uint
func (*MagickWand) GetLastError ¶
func (mw *MagickWand) GetLastError() error
func (*MagickWand) IdentifyImage ¶
func (mw *MagickWand) IdentifyImage() string
func (*MagickWand) ReadImage ¶
func (mw *MagickWand) ReadImage(filename string) error
func (*MagickWand) ReadImageBlob ¶
func (mw *MagickWand) ReadImageBlob(blob []byte) error
func (*MagickWand) RotateImage ¶
func (mw *MagickWand) RotateImage(background *PixelWand, degrees float64) error
func (*MagickWand) ScaleImage ¶
func (mw *MagickWand) ScaleImage(cols, rows uint) error
func (*MagickWand) SetImageCompressionQuality ¶
func (mw *MagickWand) SetImageCompressionQuality(quality uint) error
func (*MagickWand) SetImageOrientation ¶
func (mw *MagickWand) SetImageOrientation(orientation OrientationType) error
func (*MagickWand) StripImage ¶
func (mw *MagickWand) StripImage() error
func (*MagickWand) ThumbnailImage ¶
func (mw *MagickWand) ThumbnailImage(cols, rows uint) error
type MagickWandException ¶
type MagickWandException struct {
// contains filtered or unexported fields
}
func (*MagickWandException) Error ¶
func (mwe *MagickWandException) Error() string
type OrientationType ¶
type OrientationType int
const ( ORIENTATION_UNDEFINED OrientationType = C.UndefinedOrientation ORIENTATION_TOP_LEFT OrientationType = C.TopLeftOrientation ORIENTATION_TOP_RIGHT OrientationType = C.TopRightOrientation ORIENTATION_BOTTOM_RIGHT OrientationType = C.BottomRightOrientation ORIENTATION_BOTTOM_LEFT OrientationType = C.BottomLeftOrientation ORIENTATION_LEFT_TOP OrientationType = C.LeftTopOrientation ORIENTATION_RIGHT_TOP OrientationType = C.RightTopOrientation ORIENTATION_RIGHT_BOTTOM OrientationType = C.RightBottomOrientation ORIENTATION_LEFT_BOTTOM OrientationType = C.LeftBottomOrientation )
type PixelWand ¶
type PixelWand struct {
// contains filtered or unexported fields
}
func NewPixelWand ¶
func NewPixelWand() *PixelWand
type ResourceType ¶
type ResourceType int
const ( RESOURCE_UNDEFINED ResourceType = C.UndefinedResource RESOURCE_AREA ResourceType = C.AreaResource RESOURCE_DISK ResourceType = C.DiskResource RESOURCE_FILE ResourceType = C.FileResource RESOURCE_MAP ResourceType = C.MapResource RESOURCE_MEMORY ResourceType = C.MemoryResource )
Click to show internal directories.
Click to hide internal directories.