用户名: 密   码:
   飞诺网 加入收藏
飞诺网 网站开发 VBScript ASP Asp.net Jsp php XML CGI-Perl 搜索引擎 ajax web技术
PHP系列教程 PHP实例 php技术文档

您当前的位置:飞诺网 >> php >> PHP实例

MagickWand For PHP

www.diybl.com    时间 : 2008-07-01  作者:佚名   编辑:本站 点击:   [ 评论 ]


Prev
MagickWand For PHP
Manual


Next

MagickWand For PHP

Introduction

This module enables PHP access to the ImageMagick MagickWand API. Here is a short example that annotates a flower:

<?php
$magick_wand=NewMagickWand();
MagickReadImage($magick_wand,'rose.jpg');
$drawing_wand=NewDrawingWand();
DrawSetFont($drawing_wand,"/usr/share/fonts/bitstream-vera/Vera.ttf");
DrawSetFontSize($drawing_wand,20);
DrawSetGravity($drawing_wand,MW_CenterGravity);
$pixel_wand=NewPixelWand();
PixelSetColor($pixel_wand,"white");
DrawSetFillColor($drawing_wand,$pixel_wand);
if (MagickAnnotateImage($magick_wand,$drawing_wand,0,0,0,"Rose") != 0)
{
MagickEchoImageBlob( $magick_wand );
}
else
{
echo MagickGetExceptionString($magick_wand);
}
?>

Requirements

In order to use the MagickWand For PHP module's functions, you need to install ImageMagick version 6.3.5, or greater, and the MagickWand for PHP extension source code / DLL.

ImageMagick can be downloaded from http://www.imagemagick.org/.

MagickWand For PHP's source / DLL can be downloaded from http://www.magickwand.org/download/php/.

The MagickWand For PHP stable and development source releases are available via anonymous Subversion. This is a convenient way for developers to download the MagickWandForPHP source, fix bugs, or add new features.

To retrieve, or check out MagickWandForPHP stable, use this command:

svn co https://www.imagemagick.org/subversion/MagickWandForPHP/branches/MagickWandForPHP-1.0.7 MagickWandForPHP-1.0.7

To retrieve, or check out MagickWandForPHP development, use this command:

svn co https://www.imagemagick.org/subversion/MagickWandForPHP/trunk MagickWandForPHP

Installation

Linux / Unix

The following installation instructions are taken directly from the "INSTALL" file in the MagickWand For PHP distribution:

MagickWand Extension for PHP :: Installation Instructions

** REQUIRED ** ImageMagick version :: 6.3.5-9
Last-known-good ImageMagick version :: 6.3.5-9


Installation Steps

1) Either install the required ImageMagick version or make sure that it
is installed (running "Wand-config --version" should give you the
required information).

2) Extract the contents of the archive this file was in, or copy the
entire directory the this file is in (make sure that it is still called
"magickwand") to the "ext" directory in the PHP source folder. So, if
your PHP source folder is called "PHP_SRC_DIR", you should end up with
a directory structure like the following:

PHP_SRC_DIR/ext/magickwand/

3) Go into the "PHP_SRC_DIR/ext/magickwand/" directory, and run "phpize".
(A note: if this is the first time PHP is being installed, you have to
install PHP without MagickWand, because "phpize" is a part of the PHP
distribution.)

4) Go back to the main PHP source directory (from the example above, it
would be "PHP_SRC_DIR", and run:

rm ./configure

and then

./buildconf --force

to remove and rebuild the PHP configure script.

5) Follow the PHP installation instructions, but add

--with-magickwand=IMG_MGCK_DIR

to your ./configure command, replacing "IMG_MGCK_DIR" with the full path
of the directory where ImageMagick is installed (in most cases "/usr").

Windows

To be added.

Resource Types

There are four resource types used in the MagickWand For PHP extension:

DrawingWand
This resource is used by the vector drawing functions (functions starting with "Draw"). It is created by NewDrawingWand(), and basically holds a list of vector drawing commands.

MagickWand
This resource represents a structure which contains a list of images. It is created new NewMagickWand().

PixelWand
This resource represents color information. It is created by NewPixelWand().

PixelIterator
This resource allows rapid pixel level alteration of individual pixels in an image. It is created by NewPixeliterator() and by NewPixelRegionIterator().

Predefined Constants

The constants below are defined by this extension, and will only be available when the extension has either been compiled into PHP or dynamically loaded at runtime.

Quantum color constants

Constant Type Description
MW_MaxRGB float Maximum Quantum color value; this value will be different, depending on the quantum depth ImageMagick was installed with, so it is a good idea to base Quantum color values on fractions of this value.
For example,
$red_quantum = MW_MaxRGB * 0.5; //this is equal to approx. '77' in hexadecimal color value
PixelSetRedQuantum( $pxl_wnd, $red_quantum );
MW_OpaqueOpacity float Quantum opacity vaule which indicates fully opaque.
MW_TransparentOpacity float Quantum opacity vaule which indicates fully transparent.

AlignType constants

Constant Type
MW_UndefinedAlign integer
MW_LeftAlign integer
MW_CenterAlign integer
MW_RightAlign integer

AlphaChannel constants

Constant Type
MW_UndefinedAlphaChannel integer
MW_ActivateAlphaChannel integer
MW_DeactivateAlphaChannel integer
MW_ResetAlphaChannel integer
MW_SetAlphaChannel integer

ChannelType constants

Constant Type
MW_UndefinedChannel integer
MW_RedChannel integer
MW_CyanChannel integer
MW_GreenChannel integer
MW_MagentaChannel integer
MW_BlueChannel integer
MW_YellowChannel integer
MW_AlphaChannel integer
MW_OpacityChannel integer
MW_BlackChannel integer
MW_IndexChannel integer
MW_AllChannels integer

ClipPathUnits constants

Constant Type
MW_UndefinedPathUnits integer
MW_UserSpace integer
MW_UserSpaceOnUse integer
MW_ObjectBoundingBox integer

ColorspaceType constants

Constant Type
MW_UndefinedColorspace integer
MW_RGBColorspace integer
MW_GRAYColorspace integer
MW_TransparentColorspace integer
MW_OHTAColorspace integer
MW_LABColorspace integer
MW_XYZColorspace integer
MW_YCbCrColorspace integer
MW_YCCColorspace integer
MW_YIQColorspace integer
MW_YPbPrColorspace integer
MW_YUVColorspace integer
MW_CMYKColorspace integer
MW_sRGBColorspace integer
MW_HSBColorspace integer
MW_HSLColorspace integer
MW_HWBColorspace integer

CompositeOperator constants

Constant Type
MW_UndefinedCompositeOp integer
MW_NoCompositeOp integer
MW_AddCompositeOp integer
MW_AtopCompositeOp integer
MW_BlendCompositeOp integer
MW_BumpmapCompositeOp integer
MW_ClearCompositeOp integer
MW_ColorBurnCompositeOp integer
MW_ColorDodgeCompositeOp integer
MW_ColorizeCompositeOp integer
MW_CopyBlackCompositeOp integer
MW_CopyBlueCompositeOp integer
MW_CopyCompositeOp integer
MW_CopyCyanCompositeOp integer
MW_CopyGreenCompositeOp integer
MW_CopyMagentaCompositeOp integer
MW_CopyOpacityCompositeOp integer
MW_CopyRedCompositeOp integer
MW_CopyYellowCompositeOp integer
MW_DarkenCompositeOp integer
MW_DstAtopCompositeOp integer
MW_DstCompositeOp integer
MW_DstInCompositeOp integer
MW_DstOutCompositeOp integer
MW_DstOverCompositeOp integer
MW_DifferenceCompositeOp integer
MW_DisplaceCompositeOp integer
MW_DissolveCompositeOp integer
MW_ExclusionCompositeOp integer
MW_HardLightCompositeOp integer
MW_HueCompositeOp integer
MW_InCompositeOp integer
MW_LightenCompositeOp integer
MW_LuminizeCompositeOp integer
MW_MinusCompositeOp integer
MW_ModulateCompositeOp integer
MW_MultiplyCompositeOp integer
MW_OutCompositeOp integer
MW_OverCompositeOp integer
MW_OverlayCompositeOp integer
MW_PlusCompositeOp integer
MW_ReplaceCompositeOp integer
MW_SaturateCompositeOp integer
MW_ScreenCompositeOp integer
MW_SoftLightCompositeOp integer
MW_SrcAtopCompositeOp integer
MW_SrcCompositeOp integer
MW_SrcInCompositeOp integer
MW_SrcOutCompositeOp integer
MW_SrcOverCompositeOp integer
MW_SubtractCompositeOp integer
MW_ThresholdCompositeOp integer
MW_XorCompositeOp integer

CompressionType constants

Constant Type
MW_UndefinedCompression integer
MW_NoCompression integer
MW_BZipCompression integer
MW_FaxCompression integer
MW_Group4Compression integer
MW_JPEGCompression integer
MW_LosslessJPEGCompression integer
MW_LZWCompression integer
MW_RLECompression integer
MW_ZipCompression integer

DecorationType constants

Constant Type
MW_UndefinedDecoration integer
MW_NoDecoration integer
MW_UnderlineDecoration integer
MW_OverlineDecoration integer
MW_LineThroughDecoration integer

DisposeType constants

Constant Type
MW_UnrecognizedDispose integer
MW_UndefinedDispose integer
MW_NoneDispose integer
MW_BackgroundDispose integer
MW_PreviousDispose integer

ExceptionType constants

Constant Type
MW_UndefinedException integer
MW_WarningException integer
MW_ResourceLimitWarning integer
MW_TypeWarning integer
MW_OptionWarning integer
MW_DelegateWarning integer
MW_MissingDelegateWarning integer
MW_CorruptImageWarning integer
MW_FileOpenWarning integer
MW_BlobWarning integer
MW_StreamWarning integer
MW_CacheWarning integer
MW_CoderWarning integer
MW_ModuleWarning integer
MW_DrawWarning integer
MW_ImageWarning integer
MW_WandWarning integer
MW_MonitorWarning integer
MW_RegistryWarning integer
MW_ConfigureWarning integer
MW_ErrorException integer
MW_ResourceLimitError integer
MW_TypeError integer
MW_OptionError integer
MW_DelegateError integer
MW_MissingDelegateError integer
MW_CorruptImageError integer
MW_FileOpenError integer
MW_BlobError integer
MW_StreamError integer
MW_CacheError integer
MW_CoderError integer
MW_ModuleError integer
MW_DrawError integer
MW_ImageError integer
MW_WandError integer
MW_MonitorError integer
MW_RegistryError integer
MW_ConfigureError integer
MW_FatalErrorException integer
MW_ResourceLimitFatalError integer
MW_TypeFatalError integer
MW_OptionFatalError integer
MW_DelegateFatalError integer
MW_MissingDelegateFatalError integer
MW_CorruptImageFatalError integer
MW_FileOpenFatalError integer
MW_BlobFatalError integer
MW_StreamFatalError integer
MW_CacheFatalError integer
MW_CoderFatalError integer
MW_ModuleFatalError integer
MW_DrawFatalError integer
MW_ImageFatalError integer
MW_WandFatalError integer
MW_MonitorFatalError integer
MW_RegistryFatalError integer
MW_ConfigureFatalError integer

FillRule constants

Constant Type
MW_UndefinedRule integer
MW_EvenOddRule integer
MW_NonZeroRule integer

FilterTypes constants

Constant Type
MW_UndefinedFilter integer
MW_PointFilter integer
MW_BoxFilter integer
MW_TriangleFilter integer
MW_HermiteFilter integer
MW_HanningFilter integer
MW_HammingFilter integer
MW_BlackmanFilter integer
MW_GaussianFilter integer
MW_QuadraticFilter integer
MW_CubicFilter integer
MW_CatromFilter integer
MW_MitchellFilter integer
MW_LanczosFilter integer
MW_BesselFilter integer
MW_SincFilter integer

GravityType constants

Constant Type
MW_UndefinedGravity integer
MW_ForgetGravity integer
MW_NorthWestGravity integer
MW_NorthGravity integer
MW_NorthEastGravity integer
MW_WestGravity integer
MW_CenterGravity integer
MW_EastGravity integer
MW_SouthWestGravity integer
MW_SouthGravity integer
MW_SouthEastGravity integer
MW_StaticGravity integer

ImageType constants

Constant Type
MW_UndefinedType integer
MW_BilevelType integer
MW_GrayscaleType integer
MW_GrayscaleMatteType integer
MW_PaletteType integer
MW_PaletteMatteType integer
MW_TrueColorType integer
MW_TrueColorMatteType integer
MW_ColorSeparationType integer
MW_ColorSeparationMatteType integer
MW_OptimizeType integer

InterlaceType constants

Constant Type
MW_UndefinedInterlace integer
MW_NoInterlace integer
MW_LineInterlace integer
MW_PlaneInterlace integer
MW_PartitionInterlace integer

LineCap constants

Constant Type
MW_UndefinedCap integer
MW_ButtCap integer
MW_RoundCap integer
MW_SquareCap integer

LineJoin constants

Constant Type
MW_UndefinedJoin integer
MW_MiterJoin integer
MW_RoundJoin integer
MW_BevelJoin integer

MagickEvaluateOperator constants

Constant Type
MW_UndefinedEvaluateOperator integer
MW_AddEvaluateOperator integer
MW_AndEvaluateOperator integer
MW_DivideEvaluateOperator integer
MW_LeftShiftEvaluateOperator integer
MW_MaxEvaluateOperator integer
MW_MinEvaluateOperator integer
MW_MultiplyEvaluateOperator integer
MW_OrEvaluateOperator integer
MW_RightShiftEvaluateOperator integer
MW_SetEvaluateOperator integer
MW_SubtractEvaluateOperator integer
MW_XorEvaluateOperator integer

MetricType constants

Constant Type
MW_UndefinedMetric integer
MW_MeanAbsoluteErrorMetric integer
MW_MeanSquaredErrorMetric integer
MW_PeakAbsoluteErrorMetric integer
MW_PeakSignalToNoiseRatioMetric integer
MW_RootMeanSquaredErrorMetric integer

MontageMode constants

Constant Type
MW_UndefinedMode integer
MW_FrameMode integer
MW_UnframeMode integer
MW_ConcatenateMode integer

NoiseType constants

Constant Type
MW_UndefinedNoise integer
MW_UniformNoise integer
MW_GaussianNoise integer
MW_MultiplicativeGaussianNoise integer
MW_ImpulseNoise integer
MW_LaplacianNoise integer
MW_PoissonNoise integer

PaintMethod constants

Constant Type
MW_UndefinedMethod integer
MW_PointMethod integer
MW_ReplaceMethod integer
MW_FloodfillMethod integer
MW_FillToBorderMethod integer
MW_ResetMethod integer

PreviewType constants

Constant Type
MW_UndefinedPreview integer
MW_RotatePreview integer
MW_ShearPreview integer
MW_RollPreview integer
MW_HuePreview integer
MW_SaturationPreview integer
MW_BrightnessPreview integer
MW_GammaPreview integer
MW_SpiffPreview integer
MW_DullPreview integer
MW_GrayscalePreview integer
MW_QuantizePreview integer
MW_DespecklePreview integer
MW_ReduceNoisePreview integer
MW_AddNoisePreview integer
MW_SharpenPreview integer
MW_BlurPreview integer
MW_ThresholdPreview integer
MW_EdgeDetectPreview integer
MW_SpreadPreview integer
MW_SolarizePreview integer
MW_ShadePreview integer
MW_RaisePreview integer
MW_SegmentPreview integer
MW_SwirlPreview integer
MW_ImplodePreview integer
MW_WavePreview integer
MW_OilPaintPreview integer
MW_CharcoalDrawingPreview integer
MW_JPEGPreview integer

RenderingIntent constants

Constant Type
MW_UndefinedIntent integer
MW_SaturationIntent integer
MW_PerceptualIntent integer
MW_AbsoluteIntent integer
MW_RelativeIntent integer

ResolutionType constants

Constant Type
MW_UndefinedResolution integer
MW_PixelsPerInchResolution integer
MW_PixelsPerCentimeterResolution integer

ResourceType constants

Constant Type
MW_UndefinedResource integer
MW_AreaResource integer
MW_DiskResource integer
MW_FileResource integer
MW_MapResource integer
MW_MemoryResource integer

StorageType constants

Constant Type
MW_UndefinedPixel integer
MW_CharPixel integer
MW_ShortPixel integer
MW_IntegerPixel integer
MW_LongPixel integer
MW_FloatPixel integer
MW_DoublePixel integer

StretchType constants

Constant Type
MW_UndefinedStretch integer
MW_NormalStretch integer
MW_UltraCondensedStretch integer
MW_ExtraCondensedStretch integer
MW_CondensedStretch integer
MW_SemiCondensedStretch integer
MW_SemiExpandedStretch integer
MW_ExpandedStretch integer
MW_ExtraExpandedStretch integer
MW_UltraExpandedStretch integer
MW_AnyStretch integer

StyleType constants

Constant Type
MW_UndefinedStyle integer
MW_NormalStyle integer
MW_ItalicStyle integer
MW_ObliqueStyle integer
MW_AnyStyle integer

VirtualPixelMethod constants

Constant Type
MW_UndefinedVirtualPixelMethod integer
MW_ConstantVirtualPixelMethod integer
MW_EdgeVirtualPixelMethod integer
MW_MirrorVirtualPixelMethod integer
MW_TileVirtualPixelMethod integer

MagickWand For PHP Methods

ClearDrawingWand -- clears a DrawingWand resource
ClearMagickWand -- clears resources associated with a MagickWand resource
ClearPixelIterator -- clears resources associated with a PixelIterator resource
ClearPixelWand -- clears resources associated with a PixelWand resource
CloneDrawingWand -- makes an exact copy of a DrawingWand resource
CloneMagickWand -- make a copy of a MagickWand
DestroyDrawingWand -- destroys a DrawingWand resource
DestroyMagickWand -- destroys a MagickWand resource
DestroyPixelIterator -- destroys a PixelIterator resource
DestroyPixelWand -- destroys a PixelWand resource
DestroyPixelWandArray -- destroys an array of PixelWand resources
DestroyPixelWands -- alias of DestroyPixelWandArray()
DrawAffine -- adjusts the current affine transformation matrix
DrawAnnotation -- draws text on the image
DrawArc -- draws an arc on the image
DrawBezier -- draws a Bezier curve using the current stroke, stroke width, and fill color or texture
DrawCircle -- draws a circle on the image
DrawColor -- draws color on an image using the current fill color
DrawComment -- adds a comment to a vector output stream
DrawComposite -- composites an image onto the current active image
DrawEllipse -- draws an ellipse on the image
DrawGetClipPath -- returns the current clipping path ID
DrawGetClipRule -- returns the current polygon fill rule to be used by the clipping path
DrawGetClipUnits -- returns the interpretation of clip path units in the current active image
DrawGetException -- returns the description and type of a DrawingWand error
DrawGetExceptionString -- returns the description of a DrawingWand error
DrawGetExceptionType -- returns the numerical type of a DrawingWand error
DrawGetFillAlpha -- returns the opacity used when drawing using the fill color or fill texture
DrawGetFillColor -- returns the fill color used for drawing filled objects
DrawGetFillOpacity -- returns the opacity used when drawing using the fill color or fill texture
DrawGetFillRule -- returns the fill rule used while drawing polygons
DrawGetFont -- returns a string specifying the font used when annotating with text
DrawGetFontFamily -- returns the font family to use when annotating with text
DrawGetFontSize -- returns the font pointsize used when annotating with text
DrawGetFontStretch -- returns the font stretch used when annotating with text
DrawGetFontStyle -- returns the font style used when annotating with text
DrawGetFontWeight -- returns the font weight used when annotating with text
DrawGetGravity -- returns the text placement gravity used when annotating with text
DrawGetStrokeAlpha -- returns the opacity of stroked object outlines
DrawGetStrokeAntialias -- returns the current stroke antialias setting
DrawGetStrokeColor -- returns the color used for stroking object outlines
DrawGetStrokeDashArray -- returns an array representing the pattern of dashes and gaps used to stroke paths
DrawGetStrokeDashOffset -- returns the offset into the dash pattern where the dash starts
DrawGetStrokeLineCap -- returns the shape to be used at the end of open subpaths when they are stroked
DrawGetStrokeLineJoin -- returns the shape to be used at the corners of paths (or other vector shapes) when they are stroked
DrawGetStrokeMiterLimit -- returns the miter limit
DrawGetStrokeOpacity -- returns the opacity of stroked object outlines
DrawGetStrokeWidth -- returns the width of the stroke used to draw object outlines
DrawGetTextAlignment -- returns the alignment that will be applied when annotating with text
DrawGetTextAntialias -- returns the current text antialias setting
DrawGetTextDecoration -- returns the decoration applied when annotating with text
DrawGetTextEncoding -- returns a string specifying the code set used for text annotations
DrawGetTextUnderColor -- returns the color of the background rectangle placed under text annotations
DrawGetVectorGraphics -- returns the DrawingWand's vector graphics string
DrawLine -- draws a line on the image
DrawMatte -- paints on the image's opacity channel in order to set affected pixels to transparent
DrawPathClose -- closes the current path
DrawPathCurveToAbsolute -- draws a cubic Bezier curve from the current point using absolute coordinates
DrawPathCurveToQuadraticBezierAbsolute -- draws a quadratic Bezier curve from the current point using absolute coordinates
DrawPathCurveToQuadraticBezierRelative -- draws a quadratic Bezier curve from the current point using relative coordinates
DrawPathCurveToQuadraticBezierSmoothAbsolute -- draws a quadratic Bezier curve from the current point using absolute coordinates
DrawPathCurveToQuadraticBezierSmoothRelative -- draws a quadratic Bezier curve from the current point using relative coordinates
DrawPathCurveToRelative -- draws a cubic Bezier curve from the current point using relative coordinates
DrawPathCurveToSmoothAbsolute -- draws a cubic Bezier curve from the current point using absolute coordinates
DrawPathCurveToSmoothRelative -- draws a cubic Bezier curve from the current point using relative coordinates
DrawPathEllipticArcAbsolute -- draws an elliptical arc from the current point using absolute coordinates
DrawPathEllipticArcRelative -- draws an elliptical arc from the current point using relative coordinates
DrawPathFinish -- terminates the current path
DrawPathLineToAbsolute -- draws a line path from the current point to the given coordinate using absolute coordinates
DrawPathLineToHorizontalAbsolute -- draws a horizontal line path from the current point to the target point using absolute coordinates
DrawPathLineToHorizontalRelative -- draws a horizontal line path from the current point to the target point using relative coordinates
DrawPathLineToRelative -- draws a line path from the current point to the given coordinate using relative coordinates
DrawPathLineToVerticalAbsolute -- draws a vertical line path from the current point to the target point using absolute coordinates
DrawPathLineToVerticalRelative -- draws a vertical line path from the current point to the target point using relative coordinates
DrawPathMoveToAbsolute -- starts a new sub-path at the given coordinate using absolute coordinates
DrawPathMoveToRelative -- starts a new sub-path at the given coordinate using relative coordinates
DrawPathStart -- declares the start of a path drawing list
DrawPoint -- draws a point at the specified coordinates
DrawPolygon -- draws a polygon using the current stroke, stroke width, and fill color or texture
DrawPolyline -- draws a polyline using the current stroke, stroke width, and fill color or texture
DrawPopClipPath -- terminates a clip path definition
DrawPopDefs -- terminates a definition list
DrawPopPattern -- terminates a pattern definition
DrawPushClipPath -- starts a clip path definition
DrawPushDefs --
DrawPushPattern -- starts the definition of a named pattern
DrawRectangle -- draws a rectangle
DrawRender -- renders all preceding drawing commands
DrawRotate -- applies the specified rotation to the current coordinate space
DrawRoundRectangle -- draws a rounted rectangle
DrawScale -- adjusts the scaling factor to apply in the horizontal and vertical directions to the current coordinate space
DrawSetClipPath -- associates a named clipping path with the DrawingWand
DrawSetClipRule -- sets the current polygon fill rule to be used by the clipping path
DrawSetClipUnits -- sets the interpretation of clip path units in the current active image
DrawSetFillAlpha -- sets the opacity to use when drawing using the fill color or fill texture
DrawSetFillColor -- sets the fill color to be used for drawing filled objects
DrawSetFillOpacity -- sets the opacity to use when drawing using the fill color or fill texture
DrawSetFillPatternURL -- sets the URL to use as a fill pattern for filling objects
DrawSetFillRule -- sets the fill rule used while drawing polygons
DrawSetFont -- sets the font file to use when annotating with text
DrawSetFontFamily -- sets the font family to use when annotating with text
DrawSetFontSize -- sets the font pointsize to use when annotating with text
DrawSetFontStretch -- sets the font stretch used when annotating with text
DrawSetFontStyle -- sets the font style used when annotating with text
DrawSetFontWeight -- sets the font weight to use when annotating with text
DrawSetGravity -- sets the text placement gravity used when annotating with text
DrawSetStrokeAlpha -- specifies the opacity of stroked object outlines
DrawSetStrokeAntialias -- controls whether stroked outlines are antialiased
DrawSetStrokeColor -- sets the color used for stroking object outlines
DrawSetStrokeDashArray -- specifies the pattern of dashes and gaps used to stroke paths
DrawSetStrokeDashOffset -- specifies the offset into the dash pattern to start the dash
DrawSetStrokeLineCap -- sets the shape to be used at the end of open subpaths when they are stroked
DrawSetStrokeLineJoin -- sets the shape to be used at the corners of paths (or other vector shapes) when they are stroked
DrawSetStrokeMiterLimit -- specifies the miter limit
DrawSetStrokeOpacity -- specifies the opacity of stroked object outlines
DrawSetStrokePatternURL -- sets the pattern used for stroking object outlines
DrawSetStrokeWidth -- sets the width of the stroke used to draw object outlines
DrawSetTextAlignment -- sets the alignment that will be applied when annotating with text
DrawSetTextAntialias -- controls whether text is antialiased
DrawSetTextDecoration -- sets the decoration applied when annotating with text
DrawSetTextEncoding -- specifies specifies the text codeset to use for text annotations
DrawSetTextUnderColor -- sets the color of the background rectangle to place under text annotations
DrawSetVectorGraphics -- sets the vector graphics string associated with the specified DrawingWand
DrawSetViewbox -- sets the overall canvas size to be recorded with the drawing vector data
DrawSkewX -- skews the current coordinate system in the horizontal direction
DrawSkewY -- skews the current coordinate system in the vertical direction
DrawTranslate -- applies a translation to the current coordinate system
IsDrawingWand -- tells whether a variable is a DrawingWand resource
IsMagickWand -- tells whether a variable is a MagickWand resource
IsPixelIterator -- tells whether a variable is a PixelIterator resource
IsPixelWand -- tells whether a variable is a PixelWand resource
MagickAdaptiveThresholdImage -- selects an individual threshold for each pixel in the current active image
MagickAddImage -- adds the current active image of one MagickWand to another
MagickAddNoiseImage -- adds random noise to the current active image
MagickAffineTransformImage -- transforms the current active image as dictated by the affine matrix of the DrawingWand
MagickAnnotateImage -- annotates the current active image with text
MagickAppendImages -- appends a set of images
MagickAverageImages -- averages a set of images
MagickBlackThresholdImage -- forces all pixels below a specified threshold into black while leaving all pixels above the threshold unchanged
MagickBlurImage -- blurs the current active image, or blurs one or more image channels.
MagickBorderImage -- surrounds the current active image with a colored border
MagickCharcoalImage -- simulates a charcoal drawing
MagickChopImage -- removes a region of the current active image
MagickClipImage -- clips along the first path from the 8BIM profile, if present
MagickClipPathImage -- clips along the named paths from the 8BIM profile, if present
MagickCoalesceImages -- composites a set of images
MagickColorizeImage -- blends the fill color with each pixel in the current active image
MagickCombineImages -- combines one or more images into a single image
MagickCommentImage -- adds a comment to the current active image
MagickCompareImages -- compares one or more images, or image channels and returns the specified distortion metric
MagickCompositeImage -- composites one image onto another at the specified offset
MagickConstituteImage -- adds an image to the MagickWand comprised of the the pixel data you supply
MagickContrastImage -- enhances the intensity differences between the lighter and darker elements of the current active image
MagickConvolveImage -- applies a custom convolution kernel to the current active image, or to one or more image channels
MagickCropImage -- extracts a region of the current active image
MagickCycleColormapImage -- displaces the current active image's colormap by a given number of positions
MagickDeconstructImages -- compares each image with the next in a sequence
MagickDescribeImage -- returns a string description of the current active image
MagickDespeckleImage -- reduces the speckle noise in the current active image
MagickDrawImage -- renders the DrawingWand on the current active image
MagickEchoImageBlob -- outputs the current active image to stdout as a BLOB
MagickEchoImagesBlob -- outputs the current active image sequence to stdout as a BLOB
MagickEdgeImage -- enhance edges within the current active image with a convolution filter of a given radius
MagickEmbossImage -- creates a grayscale version of the current active image, with a three-dimensional effect
MagickEnhanceImage -- applies a digital filter that improves the quality of a noisy image
MagickEqualizeImage -- equalizes the histogram of the current active image
MagickEvaluateImage -- applies an arithmetic, relational, or logical operator to the current active image
MagickFlattenImages -- merges a sequence of images
MagickFlipImage -- creates a vertical mirror image
MagickFloodfillPaintImage -- changes the color value of any pixel that matches the target pixel and is an immediate neighbor
MagickFlopImage -- creates a horizontal mirror image
MagickFrameImage -- adds a simulated three-dimensional border around the current active image
MagickFxImage -- evaluates an expression for each pixel in the current active image or image channel
MagickGammaImage -- gamma-corrects a particular image or image channel
MagickGaussianBlurImage -- blurs the current active image, or one of its image channels
MagickGetCharHeight -- returns the maximum character height of characters in a specified string
MagickGetCharWidth -- returns the maximum character width of characters in a specified string
MagickGetCopyright -- returns the ImageMagick API copyright as a string constant
MagickGetException -- returns the description and type of a MagickWand error
MagickGetExceptionString -- returns the description of a MagickWand error
MagickGetExceptionType -- returns the numerical type of a MagickWand error
MagickGetFilename -- returns the filename associated with an image sequence
MagickGetFormat -- returns the format of the MagickWand
MagickGetHomeURL -- returns the ImageMagick home URL
MagickGetImage -- returns the current active image, in a New MagickWand
MagickGetImageClipMask -- returns the image clip mask at the current image index.
MagickGetImageBackgroundColor -- returns the current active image's background color
MagickGetImageBlob -- returns the current active image as a BLOB
MagickGetImageBluePrimary -- returns the chromaticy blue primary point of the current active image
MagickGetImageBorderColor -- returns border color of the current active image
MagickGetImageChannelMean -- returns the mean and standard deviation of one or more image channels
MagickGetImageColormapColor -- returns the color of the specified colormap index of the current active image
MagickGetImageColors -- returns the number of unique colors in the current active image
MagickGetImageColorspace -- returns the image colorspace of the current active image
MagickGetImageCompose -- returns the CompositeOperator associated with the current active image
MagickGetImageCompression -- returns the image compression of the current active image
MagickGetImageCompressionQuality -- returns the compression quality of the current active image
MagickGetImageDelay -- returns the delay of the current active image
MagickGetImageDepth -- returns the depth of a particular image or image channel
MagickGetImageDispose -- returns the image disposal method of the current active image
MagickGetImageExtrema -- returns the extrema for one or more images, or image channels
MagickGetImageFilename -- returns the filename of a particular image in a sequence
MagickGetImageFormat -- returns the format of the current active image
MagickGetImageGamma -- returns the gamma of the current active image
MagickGetImageGreenPrimary -- returns the chromaticy green primary point of the current active image
MagickGetImageHeight -- returns the height of the current active image
MagickGetImageHistogram -- returns the histogram of the current active image as an array of PixelWand resources
MagickGetImageIndex -- returns the index of the current active image
MagickGetImageInterlaceScheme -- returns the image interlace scheme of the current active image
MagickGetImageIterations -- returns the number of iterations of the current active image
MagickGetImageMatteColor -- returns matte color of the current active image
MagickGetImageMimeType -- returns the MIME media-type of the current active image
MagickGetImagePixelColor -- returns the color of the specified pixel
MagickGetImagePixels -- extracts pixel data from the current active image and returns it an array
MagickGetImageProfile -- returns the named profile of the current active image
MagickGetImageProperty -- returns the named property of the current active image
MagickGetImageRedPrimary -- returns the chromaticy red primary point of the current active image
MagickGetImageRenderingIntent -- returns the image rendering intent of the current active image
MagickGetImageResolution -- returns the X and Y resolution of the current active image
MagickGetImageScene -- returns the scene of the current active image
MagickGetImageSignature -- generates an SHA-256 message digest for the current active image's pixel stream
MagickGetImageSize -- returns the size of the current active image
MagickGetImageType -- returns the potential image type of the current active image
MagickGetImageUnits -- returns the image's units of resolution
MagickGetImageVirtualPixelMethod -- returns the virtual pixel method for the current active image
MagickGetImageWhitePoint -- returns the chromaticy white point
MagickGetImageWidth -- returns the width of the current active image
MagickGetImagesBlob -- returns the current active image sequence as a BLOB
MagickGetInterlaceScheme -- returns the image interlace scheme of a MagickWand
MagickGetMaxTextAdvance -- returns the maximum horizontal advance of a characters in a specified string
MagickGetMimeType -- returns the MIME media-type of the MagickWand
MagickGetNumberImages -- returns the number of images currently associated with a MagickWand
MagickGetPackageName -- returns the ImageMagick package name as a string constant
MagickGetQuantumDepth -- returns the ImageMagick quantum depth as a double
MagickGetReleaseDate -- returns the ImageMagick release date as a string
MagickGetResourceLimit -- returns the the specified resource in megabytes
MagickGetSamplingFactors -- returns the horizontal and vertical sampling factors
MagickGetSize -- alias of MagickGetWandSize()
MagickGetStringHeight -- returns the height of a specified string
MagickGetStringWidth -- returns the width of a specified string
MagickGetTextAscent -- returns the maximum character ascent of characters in a specified string
MagickGetTextDescent -- returns the maximum character descent of characters in a specified string
MagickGetVersion -- returns the ImageMagick API version as a string constant and as a number
MagickGetVersionNumber -- returns the ImageMagick API version as a number
MagickGetVersionString -- returns the ImageMagick API version as a string
MagickGetWandSize -- returns the size (pixel columns & rows) associated with a MagickWand
MagickHasNextImage -- returns TRUE if there are images following the current one
MagickHasPreviousImage -- returns TRUE if there are images preceeding the current one
MagickImplodeImage -- "implodes" the current active image's pixels by the specified percentage
MagickLabelImage -- adds a label to your image
MagickLevelImage -- adjusts the levels of the current active image or one of its image channels
MagickMagnifyImage -- scales the current active image proportionally to twice its original size
MagickMapImage -- replaces the colors of the current active image with the closest color from a reference image
MagickMedianFilterImage -- applies a digital filter that improves the quality of a noisy image
MagickMinifyImage -- scales the current active image proportionally to one-half its original size
MagickModulateImage -- adjust the brightness, saturation, and hue of the current active image
MagickMontageImage -- creates a composite image by combining several separate images
MagickMorphImages -- creates the appearance of a meta-morphosis from one image to the next in the MagickWand's set of images
MagickMosaicImages -- inlays the MagickWand's image sequence to form a single coherent picture
MagickMotionBlurImage -- simulates motion blur on the current active image
MagickNegateImage -- negates the colors in the current active image or one of its image channels
MagickNewImage -- adds a blank image canvas of the specified size and background color to a MagickWand's image list
MagickNextImage -- causes the next image (if any) in the MagickWand's image list to become the active/current image
MagickNormalizeImage -- enhances the contrast of a color image
MagickOilPaintImage -- applies a special effect filter that simulates an oil painting
MagickPaintOpaqueImage -- changes the color of any pixel in the current active image that matches a target color
MagickOrderedPosterizeImage -- add a noise pattern to the image with specific amplitudes
MagickPingImage -- efficiently retrieves an image file's attributes
MagickPosterizeImage -- reduces the current active image to a limited number of color levels
MagickPreviewImages -- tiles 9 thumbnails of the specified image with an image processing operation applied at varying strengths
MagickPreviousImage -- causes the previous image (if any) in the MagickWand's image list to become the active/current image
MagickProfileImage -- adds or removes a ICC, IPTC, or generic profile from the current active image
MagickQuantizeImage -- analyzes the colors within the current active image and chooses a fixed number of colors to represent the image
MagickQuantizeImages -- analyzes the colors within the MagickWand's sequence of images and chooses a fixed number of colors to represent the images
MagickQueryConfigureOption -- returns the value associated with the specified configure option
MagickQueryConfigureOptions -- returns any configure options that match the specified pattern
MagickQueryFontMetrics -- returns a 7 element array containing various font metrics
MagickQueryFonts -- returns any font that match the specified pattern
MagickQueryFormats -- returns any image formats that match the specified pattern
MagickRadialBlurImage -- radial blurs the current active image
MagickRaiseImage -- creates a simulated three-dimensional button-like effect on the current active image
MagickReadImage -- reads an image or image sequence
MagickReadImageBlob -- reads an image or image sequence from a BLOB
MagickReadImageFile -- reads an image or image sequence from an opened PHP stream
MagickReadImages -- reads an array of image filenames into the MagickWand
MagickRecolorImage -- translate, scale, shear, or rotate image colors.
MagickReduceNoiseImage -- smooths the contours of the current active image
MagickRemoveImage -- removes the current active image from the MagickWand's image list
MagickRemoveImageProfile -- removes the named image profile and returns it
MagickRemoveImageProfiles -- removes all ICC, IPTC, or generic profiles from the current active image
MagickResampleImage -- resamples the current active image to a desired resolution
MagickResetIterator -- resets the MagickWand's image iterator
MagickResizeImage -- scales the current active image to the desired dimensions
MagickRollImage -- offsets the current active image
MagickRotateImage -- rotates the current active image
MagickSampleImage -- scales the current active image
MagickScaleImage -- scales the size of the current active image to the given dimensions
MagickSeparateImageChannel -- separates a channel from the current active image
MagickSetCompressionQuality -- sets the compression quality of the MagickWand's image sequence
MagickSetFilename -- sets the filename before you read or write an image file
MagickSetFirstIterator -- sets a MagickWand's image list iterator to the first image
MagickSetFormat -- sets the format of the MagickWand
MagickShadowImage -- simulate an image shadow
MagickSetImage -- replaces the active/current image
MagickSetImageAlphaChannel -- activate, deactivate, reset, or set the alpha channel
MagickSetImageBackgroundColor -- sets background color of the current active image
MagickSetImageBias -- sets the image bias for any method that convolves the current active image
MagickSetImageBluePrimary -- sets the image chromaticity blue primary point of the current active image
MagickSetImageBorderColor -- sets the border color of the current active image
MagickSetImageClipMask -- replaces the active/current image clip mask
MagickSetImageColormapColor -- sets the color of the specified colormap index of the current active image
MagickSetImageColorspace -- sets the image colorspace of the current active image
MagickSetImageCompose -- sets the CompositeOperator associated with the current active image
MagickSetImageCompression -- sets the image compression of the current active image
MagickSetImageCompressionQuality -- sets compression quality of the current active image
MagickSetImageDelay -- sets the delay of the current active image
MagickSetImageDepth -- sets the depth of the current active image, or that of the specified image channel
MagickSetImageDispose -- sets the image disposal method of the current active image
MagickSetImageFilename -- sets the filename of the current active image
MagickSetImageFormat -- sets the format of the current active image
MagickSetImageGamma -- sets the gamma of the current active image
MagickSetImageGreenPrimary -- sets the image chromaticity green primary point of the current active image
MagickSetImageIndex -- sets the MagickWand's image index to the specified position
MagickSetImageInterlaceScheme -- sets the image interlace scheme of the current active image
MagickSetImageIterations -- sets the number of iterations of the current active image
MagickSetImageMatteColor -- sets matte color of the current active image
MagickSetImageOpacity -- sets the image opacity for any method that convolves the current active image
MagickSetImageOption -- associates one or options with a particular image format
MagickSetImagePixels -- accepts pixel data and stores it in the current active image, at the location you specify
MagickSetImageProfile -- adds a named profile to the current active image
MagickSetImageProperty -- adds a named property to the current active image
MagickSetImageRedPrimary -- sets the image chromaticity red primary point of the current active image
MagickSetImageRenderingIntent -- sets the image rendering intent of the current active image
MagickSetImageResolution -- sets the resolution of the current active image
MagickSetImageScene -- sets the scene of the current active image
MagickSetImageType -- sets the image type of the current active image
MagickSetImageUnits -- sets the image's units of resolution
MagickSetImageVirtualPixelMethod -- sets the virtual pixel method for the current active image
MagickSetImageWhitePoint -- sets the chromaticity white point of the current active image
MagickSetInterlaceScheme -- sets the interlace scheme for the MagickWand's image sequence
MagickSetLastIterator -- sets a MagickWand's image list iterator to the last image
MagickSetPassphrase -- sets the passphrase
MagickSetResolution -- sets the resolution of the current active image
MagickSetResourceLimit -- sets the limit for a particular resource in megabytes
MagickSetSamplingFactors -- sets the sampling factors of the current active image
MagickSetSize -- alias of MagickSetWandSize()
MagickSetWandSize -- sets the size of a MagickWand
MagickSharpenImage -- sharpens the current active image, or one or more of its image channels
MagickShaveImage -- shaves pixels from the edges of the current active image
MagickShearImage -- slides one edge of the current active image along the X or Y axis, creating a parallelogram
MagickSolarizeImage -- applies a special effect to the current active image
MagickSpliceImage -- splices a solid color into the current active image
MagickSpreadImage --
MagickSteganoImage -- hides a digital watermark within the current active image
MagickStereoImage --
MagickStripImage -- strips the current active image of all profiles and comments
MagickSwirlImage -- swirls the pixels about the center of the current active image
MagickTextureImage -- repeatedly tiles a texture image across and down the canvas of the current active image
MagickThresholdImage -- changes the current active image into a high-contrast, two color image
MagickTintImage -- applies a color vector to each pixel in the current active image
MagickTransformImage --
MagickTransparentPaintImage -- changes the opacity of any pixel in the current active image that matches the target color
MagickTrimImage -- removes edges that are the same color as the background color from the current active image
MagickUnsharpMaskImage -- sharpens the current active image, or one or more of its image channels
MagickWaveImage -- creates a "ripple" effect in the current active image
MagickWhiteThresholdImage --
MagickWriteImage -- writes the current active image to the specified filename
MagickWriteImageFile -- writes the current active image to an opened PHP stream
MagickWriteImages -- writes a MagickWand's image sequence to a file or files
MagickWriteImagesFile -- writes a MagickWand's image sequence to an opened PHP stream
NewDrawingWand -- returns a new DrawingWand resource.
NewMagickWand -- returns a new MagickWand resource.
NewPixelIterator -- returns a new PixelIterator resource.
NewPixelRegionIterator -- returns a new PixelIterator resource.
NewPixelWand -- returns a new PixelWand resource.
NewPixelWandArray -- returns an array of PixelWand resources.
NewPixelWands -- alias of NewPixelWandArray()
PixelGetAlpha -- returns the normalized alpha color value of the PixelWand
PixelGetAlphaQuantum -- returns the alpha Quantum color value of the PixelWand
PixelGetBlack -- returns the normalized black color value of the PixelWand
PixelGetBlackQuantum -- returns the black Quantum color of the PixelWand
PixelGetBlue -- returns the normalized blue color value of the PixelWand
PixelGetBlueQuantum -- returns the blue Quantum color of the PixelWand
PixelGetColorAsString -- returns the color of the PixelWand as a string
PixelGetColorCount -- returns the color count associated with this PixelWand
PixelGetCyan -- returns the normalized cyan color value of the PixelWand
PixelGetCyanQuantum -- returns the cyan Quantum color of the PixelWand
PixelGetException -- returns the description and type of a PixelWand error
PixelGetExceptionString -- returns the description of a PixelWand error
PixelGetExceptionType -- returns the numerical type of a PixelWand error
PixelGetGreen -- returns the normalized green color value of the PixelWand
PixelGetGreenQuantum -- returns the green Quantum color of the PixelWand
PixelGetIndex -- returns the colormap index from the PixelWand
PixelGetIteratorException -- returns the description and type of a PixelIterator error
PixelGetIteratorExceptionString -- returns the description of a PixelIterator error
PixelGetIteratorExceptionType -- returns the numerical type of a PixelIterator error
PixelGetMagenta -- returns the normalized magenta color value of the PixelWand
PixelGetMagentaQuantum -- returns the magenta Quantum color of the PixelWand
PixelGetNextIteratorRow -- returns the next row from the PixelIterator
PixelGetOpacity -- returns the normalized opacity color value of the PixelWand
PixelGetOpacityQuantum -- returns the opacity Quantum color of the PixelWand
PixelGetQuantumColor -- returns an array comprised of the red, green, blue and opacity Quantum color values of the PixelWand
PixelGetRed -- returns the normalized red color value of the PixelWand
PixelGetRedQuantum -- returns the red Quantum color of the PixelWand
PixelGetYellow -- returns the normalized yellow color value of the PixelWand
PixelGetYellowQuantum -- returns the yellow Quantum color of the PixelWand
PixelResetIterator -- resets the PixelIterator
PixelSetAlpha -- sets the normalized alpha color value of the PixelWand
PixelSetAlphaQuantum -- sets the alpha Quantum color of the PixelWand
PixelSetBlack -- sets the normalized black color value of the PixelWand
PixelSetBlackQuantum -- sets the black Quantum color of the PixelWand
PixelSetBlue -- sets the normalized blue color value of the PixelWand
PixelSetBlueQuantum -- sets the blue Quantum color of the PixelWand
PixelSetColor -- sets the color of the PixelWand with an ImageMagick color string
PixelSetColorCount -- sets the color count of the PixelWand
PixelSetCyan -- sets the normalized cyan color value of the PixelWand
PixelSetCyanQuantum -- sets the cyan Quantum color of the PixelWand
PixelSetGreen -- sets the normalized green color value of the PixelWand
PixelSetGreenQuantum -- sets the green Quantum color of the PixelWand
PixelSetIndex -- sets the colormap index of the PixelWand
PixelSetIteratorRow -- set the current row of the PixelIterator
PixelSetMagenta -- sets the normalized magenta color value of the PixelWand
PixelSetMagentaQuantum -- sets the magenta Quantum color of the PixelWand
PixelSetOpacity -- sets the normalized opacity color value of the PixelWand
PixelSetOpacityQuantum -- sets the opacity Quantum color of the PixelWand
PixelSetQuantumColor -- sets the red, green, blue, and optional opacity Quantum color values of the PixelWand
PixelSetRed -- sets the normalized red color value of the PixelWand
PixelSetRedQuantum -- sets the red Quantum color of the PixelWand
PixelSetYellow -- sets the normalized yellow color value of the PixelWand
PixelSetYellowQuantum -- sets the yellow Quantum color of the PixelWand
PixelSyncIterator -- syncronizes the PixelIterator
PopDrawingWand -- destroys the current DrawingWand and returns to the previously pushed DrawingWand
PushDrawingWand -- clones the current DrawingWand to create a new DrawingWand
WandGetException -- returns the description and type of any wand/PixelIterator error
WandGetExceptionString -- returns the description of any wand/PixelIterator error
WandGetExceptionType -- returns the numerical type of any wand/PixelIterator error
WandHasException -- determines whether a wand/PixelIterator contains an error

Prev
WandHasException
Up Next
ClearDrawingWand
如果图片或页面不能正常显示请点击这里
PHP实例推荐文章

文章评论