Manuel PHP

Table des matières

Préface
I. Au moment de commencer
II. Installation et configuration
III. Référence du langage
IV. Sécurité
V. Caractéristiques
VI. Référence des fonctions
VII. PHP et le moteur interne Zend
VIII. FAQ : foire Aux Questions
IX. Annexes
Remerciements



LXIV. Image magick Functions

Introduction

Image magick extension lets you create and manipulate images. Its function is similar to Image extension but provides more powerful and faster functions.

Pré-requis

To use this extension, either “ImageMagick” or “GraphicsMagick” library is required.

Installation

Windows binaries may be found at http://snaps.php.net/. To install, download php_imagick.dll to the folder specified by your php.ini file’s “extension_dir” directive. Enable it by adding “extension=php_imagick.dll” to your php.ini and restarting your webserver.

extension_dir=c:/php5/exts/ extension=php_imagick.dll

Linux, BSD, and other *nix variants can be compiled using the following steps:

  • Either:
    • Run the pear installer for PECL/imagick: “pecl install imagick”
    • Copy “imagick.so” from the directory indicated by the build process to the location specified in your php.ini file under “extension_dir”.
    • Add “extension=imagick.so” to your php.ini

Or:

  • Set the path to your php.ini via:

“pecl config-set php_ini /path/to/php.ini”

  • Run the pear installer for PECL/imagick: “pecl install imagick”
  • Restart your webserver to reload your php.ini settings.
Development Versions : There are currently no “stable” versions of PECL/imagick, to force installation of the “beta” version of PECL/imagick execute: “pecl install imagick-”beta
Compiling PECL/imagick without using the PEAR command : Rather than using “pecl install imagick” to automatically download and install PECL/imagick, you may download the tarball from PECL. From the root of the unpacked tarball, run: “phpize && ./configure –enable-imagick && make” to generate “imagick.so”. Once built, continue the installation from step 4 above.

Des informations sur l’installation de ces extensions PECL peuvent être trouvées dans le chapitre du manuel intitulé Installation des extensions PECL. D’autres informations comme les notes sur les nouvelles versions, les téléchargements, les sources des fichiers, les informations concernant les mainteneurs ainsi qu’un CHANGELOG, peuvent être trouvées ici : http://pecl.php.net/package/imagick.

Types de ressources

This extension uses the “imagemagick handle” resource.

Constantes pré-définies

Ces constantes sont définies par cette extension, et ne sont disponibles que si cette extension a été compilée avec PHP, ou bien chargée au moment de l’exécution.

“IMAGICK_FILTER_UNDEFINED” (integer)

“IMAGICK_FILTER_POINT” (integer)

“IMAGICK_FILTER_BOX” (integer)

“IMAGICK_FILTER_TRIANGLE” (integer)

“IMAGICK_FILTER_HERMITE” (integer)

“IMAGICK_FILTER_HANNING” (integer)

“IMAGICK_FILTER_HAMMING” (integer)

“IMAGICK_FILTER_BLACKMAN” (integer)

“IMAGICK_FILTER_GAUSSIAN” (integer)

“IMAGICK_FILTER_QUADRATIC” (integer)

“IMAGICK_FILTER_CUBIC” (integer)

“IMAGICK_FILTER_CATROM” (integer)

“IMAGICK_FILTER_MITCHELL” (integer)

“IMAGICK_FILTER_LANCZOS” (integer)

“IMAGICK_FILTER_BESSEL” (integer)

“IMAGICK_FILTER_SINC” (integer)

“IMAGICK_FILTER_UNKNOWN” (integer)

“IMAGICK_FONTSTYLE_NORMAL” (integer)

“IMAGICK_FONTSTYLE_ITALIC” (integer)

“IMAGICK_FONTSTYLE_OBLIQUE” (integer)

“IMAGICK_FONTSTYLE_ANY” (integer)

“IMAGICK_RAISE” (integer)

“IMAGICK_LOWER” (integer)

“IMAGICK_COMPOSITE_OP_UNDEFINED” (integer)

“IMAGICK_COMPOSITE_OP_OVER” (integer)

“IMAGICK_COMPOSITE_OP_IN” (integer)

“IMAGICK_COMPOSITE_OP_OUT” (integer)

“IMAGICK_COMPOSITE_OP_ATOP” (integer)

“IMAGICK_COMPOSITE_OP_XOR” (integer)

“IMAGICK_COMPOSITE_OP_PLUS” (integer)

“IMAGICK_COMPOSITE_OP_MINUS” (integer)

“IMAGICK_COMPOSITE_OP_ADD” (integer)

“IMAGICK_COMPOSITE_OP_SUBTRACT” (integer)

“IMAGICK_COMPOSITE_OP_DIFFERENCE” (integer)

“IMAGICK_COMPOSITE_OP_MULTIPLY” (integer)

“IMAGICK_COMPOSITE_OP_BUMPMAP” (integer)

“IMAGICK_COMPOSITE_OP_COPY” (integer)

“IMAGICK_COMPOSITE_OP_COPYRED” (integer)

“IMAGICK_COMPOSITE_OP_COPYGREEN” (integer)

“IMAGICK_COMPOSITE_OP_COPYBLUE” (integer)

“IMAGICK_COMPOSITE_OP_COPYOPACITY” (integer)

“IMAGICK_COMPOSITE_OP_CLEAR” (integer)

“IMAGICK_COMPOSITE_OP_DISSOLVE” (integer)

“IMAGICK_COMPOSITE_OP_DISPLACE” (integer)

“IMAGICK_COMPOSITE_OP_MODULATE” (integer)

“IMAGICK_COMPOSITE_OP_THRESHOLD” (integer)

“IMAGICK_COMPOSITE_OP_NONE” (integer)

“IMAGICK_COMPOSITE_OP_DARKEN” (integer)

“IMAGICK_COMPOSITE_OP_LIGHTEN” (integer)

“IMAGICK_COMPOSITE_OP_HUE” (integer)

“IMAGICK_COMPOSITE_OP_SATURATE” (integer)

“IMAGICK_COMPOSITE_OP_COLORIZE” (integer)

“IMAGICK_COMPOSITE_OP_LUMINIZE” (integer)

“IMAGICK_COMPOSITE_OP_SCREEN” (integer)

“IMAGICK_COMPOSITE_OP_OVERLAY” (integer)

“IMAGICK_PROFILE_OWN” (integer)

“IMAGICK_PROFILE_COPY” (integer)

“IMAGICK_TYPE_UNDEFINED” (integer)

“IMAGICK_TYPE_BILEVEL” (integer)

“IMAGICK_TYPE_GRAYSCALE” (integer)

“IMAGICK_TYPE_GRAYSCALEMATTE” (integer)

“IMAGICK_TYPE_PALETTE” (integer)

“IMAGICK_TYPE_PALETTEMATTE” (integer)

“IMAGICK_TYPE_TRUECOLOR” (integer)

“IMAGICK_TYPE_TRUECOLORMATTE” (integer)

“IMAGICK_TYPE_COLORSEPARATION” (integer)

“IMAGICK_TYPE_COLORSEPARATIONMATTE” (integer)

“IMAGICK_TYPE_OPTIMIZE” (integer)

“IMAGICK_COLORSPACE_UNDEFINED” (integer)

“IMAGICK_COLORSPACE_RGB” (integer)

“IMAGICK_COLORSPACE_GRAY” (integer)

“IMAGICK_COLORSPACE_TRANSPARENT” (integer)

“IMAGICK_COLORSPACE_OHTA” (integer)

“IMAGICK_COLORSPACE_XYZ” (integer)

“IMAGICK_COLORSPACE_YCBCR” (integer)

“IMAGICK_COLORSPACE_YCC” (integer)

“IMAGICK_COLORSPACE_YIQ” (integer)

“IMAGICK_COLORSPACE_YPBPR” (integer)

“IMAGICK_COLORSPACE_YUV” (integer)

“IMAGICK_COLORSPACE_CMYK” (integer)

“IMAGICK_COLORSPACE_SRGB” (integer)

“IMAGICK_COMPRESSION_UNDEFINED” (integer)

“IMAGICK_COMPRESSION_NONE” (integer)

“IMAGICK_COMPRESSION_BZIP” (integer)

“IMAGICK_COMPRESSION_FAX” (integer)

“IMAGICK_COMPRESSION_GROUP4” (integer)

“IMAGICK_COMPRESSION_JPEG” (integer)

“IMAGICK_COMPRESSION_LOSSLESSJPEG” (integer)

“IMAGICK_COMPRESSION_LZW” (integer)

“IMAGICK_COMPRESSION_RLE” (integer)

“IMAGICK_COMPRESSION_ZIP” (integer)

Table des matières

imagick_begindraw – Begin drawimagick_blob2image – Read image from BLOBimagick_blur – Blur imageimagick_border – Surrounds the image with a borderimagick_charcoal – Highlight edgesimagick_chop – Remove a region of an image and collapse the image to occupy the removed portionimagick_clonehandle – Clone imageimagick_composite – Composite the second image onto the first at the specified offsetsimagick_contrast – Enhance the intensity differences between the lighter and darker elements of the imageimagick_convert – Convert imageimagick_crop – Extract a region of the imageimagick_despeckle – Reduce the speckle noiseimagick_destroyhandle – Free image from memoryimagick_drawannotation – Write textimagick_drawarc – Draw arcimagick_drawcircle – Draw circleimagick_drawellipse – Draw ellipseimagick_drawline – Draw lineimagick_drawpoint – Draw pointimagick_drawrectangle – Draw rectangleimagick_edge – Find edgesimagick_emboss – Return a grayscale image with a three-dimensional effectimagick_enhance – Apply a digital filter that improves the quality of a noisy imageimagick_equalize – Apply a histogram equalization to the imageimagick_error – Check whether there is an errorimagick_faileddescription – Get description of failureimagick_failedreason – Get reason of failureimagick_first – Set the internal pointer of an image list to its first elementimagick_flatten – Merge a sequence of imagesimagick_flip – Create a vertical mirror image by reflecting the pixels around the central x-axisimagick_flop – Create a horizontal mirror image by reflecting the pixels around the central y-axisimagick_frame – Add a simulated three-dimensional border around the imageimagick_free – Alias of imagick_destroyhandle()
imagick_gamma – Gamma-correct a particular image channelimagick_gaussianblur – Blur imageimagick_getcanvas – Get canvasimagick_getcolorspace – Get color spaceimagick_getdpix – Get DPI in X axisimagick_getdpiy – Get DPI in Y axisimagick_getheight – Get heightimagick_getimagedepth – Get color depthimagick_getimagefromlist – Return copy of an image from the listimagick_getimagetype – Get image typeimagick_getlistindex – Get position in the list of the specified imageimagick_getlistsize – Get list sizeimagick_getmagick – Get Magick stringimagick_getmimetype – Get MIME typeimagick_getnumbercolors – Get number of colorsimagick_getwidth – Get widthimagick_goto – Go to specified image in a listimagick_image2blob – Return image as BLOBimagick_implode – Implode image pixelsimagick_iserror – Check whether there is an error with imageimagick_isgrayimage – Check whether image is grayimagick_isimagesequal – Compare two imagesimagick_ismonochromeimage – Check whether image is monochromeimagick_isopaqueimage – Check whether image is opaqueimagick_ispaletteimage – Check whether image is paletteimagick_level – Adjust levels of a particular image channel by scaling the colors falling between specified white and black points to the full available quantum rangeimagick_magnify – Double-size the image using bilinear interpolationimagick_medianfilter – Replace each pixel by the median in a set of neighboring pixelsimagick_minify – Half-size the image using the weighted average of a 4×4 cellimagick_modulate – Control brightness, saturation and hueimagick_mosaic – Inlay a number of images to form a single coherent pictureimagick_motionblur – Simulate motion blurimagick_negate – Negate the colorsimagick_newimagelist – Create new image listimagick_next – Advance the internal pointer of an image listimagick_normalize – Enhance the contrast of a color image by mapping the darkest 2 percent of all pixel to black and the brightest 1 percent to whiteimagick_oilpaint – Simulate oil paintingimagick_ordereddither – Use the ordered dithering technique of reducing color images to monochromeimagick_poplist – Remove the last image in the listimagick_prev – Rewind the internal pointer of an image listimagick_profile – Add or remove a ICC, IPTC, or generic profile from an imageimagick_pushlist – Add an image to the end of the listimagick_raise – Create a simulated three-dimensional button-like effectimagick_read – Alias of imagick_readimage()
imagick_readimage – Read imageimagick_reducenoise – Smooth the contours of an image while still preserving edge informationimagick_resize – Resize imageimagick_roll – Offset an image as defined by x and yimagick_rotate – Rotate imageimagick_sample – Scale image using pixel samplingimagick_scale – Scale image using pnmscale() of PBMPLUSimagick_set_image_comment – Set “comment” attribute of imageimagick_set_image_quality – Set image qualityimagick_setcompressionquality – Set compression qualityimagick_setcompressiontype – Set compression typeimagick_setdpi – Set DPIimagick_setfillcolor – Set fill colorimagick_setfillopacity – Set fill opacityimagick_setfontface – Set font faceimagick_setfontsize – Set font sizeimagick_setfontstyle – Set font styleimagick_shade – Shine a distant light on an image to create a three-dimensional effectimagick_sharpen – Sharpen imageimagick_shear – Slide one edge of an image along the X or Y axis, creating a parallelogramimagick_solarize – Solarize imageimagick_spread – Randomly displace each pixel in a blockimagick_swirl – Swirl pixels around the center of imageimagick_threshold – Change the value of individual pixels based on the intensity of each pixel compared to thresholdimagick_transformrgb – Convert the image from RGB to an alternate colorspaceimagick_transparent – Make image transparentimagick_unsharpmask – Sharpen imageimagick_wave – Creates a ripple effect in the image by shifting the pixels vertically along a sine waveimagick_writeimage – Write imageimagick_writeimages – Write imagesimagick_zoom – Zoom image using selected filter

Travail collaboratif

Contribuez, en ajjoutant des elements a cette page de manuel :

Merci de votre aide
L’equipe Php.fr

 


Index | Afficher le texte source | Anciennes révisions | Derniers changements | Connexion
©2007 Wiki Copyright