Crea sito

Content



Gmagick::readimagefile

(PECL gmagick >= Unknown)

Gmagick::readimagefileThe readimagefile purpose

Descrizione

public void Gmagick::readimagefile ( resource $fp [, string $filename ] )

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

Elenco dei parametri

fp

The file descriptor.

Valori restituiti

The Gmagick object on success

Errori/Eccezioni

Throws an GmagickException on error.



Gmagick::reducenoiseimage

(PECL gmagick >= Unknown)

Gmagick::reducenoiseimageSmooths the contours of an image

Descrizione

public void Gmagick::reducenoiseimage ( float $radius )

Smooths the contours of an image while still preserving edge information. The algorithm works by replacing each pixel with its neighbor closest in value. A neighbor is defined by radius. Use a radius of 0 and Gmagick::reduceNoiseImage() selects a suitable radius for you.

Elenco dei parametri

radius

The radius of the pixel neighborhood.

Valori restituiti

The Gmagick object on success

Errori/Eccezioni

Throws an GmagickException on error.



Gmagick::removeimage

(PECL gmagick >= Unknown)

Gmagick::removeimageRemoves an image from the image list

Descrizione

public void Gmagick::removeimage ( void )

Removes an image from the image list.

Elenco dei parametri

Questa funzione non contiene parametri.

Valori restituiti

The Gmagick object on success.

Errori/Eccezioni

Throws an GmagickException on error.



Gmagick::removeimageprofile

(PECL gmagick >= Unknown)

Gmagick::removeimageprofileRemoves the named image profile and returns it

Descrizione

public string Gmagick::removeimageprofile ( string $name )

Removes the named image profile and returns it.

Elenco dei parametri

name

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

Valori restituiti

The Gmagick object on success

Errori/Eccezioni

Throws an GmagickException on error.



Gmagick::resampleimage

(PECL gmagick >= Unknown)

Gmagick::resampleimageResample image to desired resolution

Descrizione

public void Gmagick::resampleimage ( float $xResolution , float $yResolution , int $filter , float $blur )

Resample image to desired resolution.

Elenco dei parametri

xResolution

The new image x resolution.

yResolution

The new image y resolution.

filter

Image filter to use.

blur

The blur factor where larger than 1 is blurry, smaller than 1 is sharp.

Valori restituiti

The Gmagick object on success

Errori/Eccezioni

Throws an GmagickException on error.



Gmagick::resizeimage

(PECL gmagick >= Unknown)

Gmagick::resizeimageScales an image

Descrizione

public void Gmagick::resizeimage ( int $width , int $height , int $filter , float $blur [, bool $fit = false ] )

Scales an image to the desired dimensions with a filter.

Elenco dei parametri

width

The number of columns in the scaled image.

height

The number of rows in the scaled image.

filter

Image filter to use.

blur

The blur factor where larger than 1 is blurry, lesser than 1 is sharp.

Valori restituiti

The Gmagick object on success

Errori/Eccezioni

Throws an GmagickException on error.



Gmagick::rollimage

(PECL gmagick >= Unknown)

Gmagick::rollimageOffsets an image

Descrizione

public void Gmagick::rollimage ( int $x , int $y )

Offsets an image as defined by x and y.

Elenco dei parametri

x

The x offset.

y

The y offset.

Valori restituiti

The Gmagick object on success

Errori/Eccezioni

Throws an GmagickException on error.



Gmagick::rotateimage

(PECL gmagick >= Unknown)

Gmagick::rotateimageRotates an image

Descrizione

public Gmagick Gmagick::rotateimage ( mixed $color , float $degrees )

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

Elenco dei parametri

color

The background pixel.

degrees

The number of degrees to rotate the image.

Valori restituiti

The Gmagick object on success

Errori/Eccezioni

Throws an GmagickException on error.



Gmagick::scaleimage

(PECL gmagick >= Unknown)

Gmagick::scaleimageScales the size of an image

Descrizione

public Gmagick Gmagick::scaleimage ( int $width , int $height [, bool $fit = false ] )

Scales the size of an image to the given dimensions. The other parameter will be calculated if 0 is passed as either param.

Elenco dei parametri

width

The number of columns in the scaled image.

height

The number of rows in the scaled image.

Valori restituiti

The Gmagick object on success.

Errori/Eccezioni

Throws an GmagickException on error.



Gmagick::separateimagechannel

(PECL gmagick >= Unknown)

Gmagick::separateimagechannelSeparates a channel from the image

Descrizione

public Gmagick Gmagick::separateimagechannel ( int $channel )

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

Elenco dei parametri

channel

Identify which channel to extract: RedChannel, GreenChannel, BlueChannel, OpacityChannel, CyanChannel, MagentaChannel, YellowChannel, BlackChannel.

Valori restituiti

The Gmagick object on success

Errori/Eccezioni

Throws an GmagickException on error.



Gmagick::setfilename

(PECL gmagick >= Unknown)

Gmagick::setfilenameSets the filename before you read or write the image

Descrizione

public Gmagick Gmagick::setfilename ( string $filename )

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

Elenco dei parametri

filename

The image filename.

Valori restituiti

The Gmagick object on success

Errori/Eccezioni

Throws an GmagickException on error.



Gmagick::setimagebackgroundcolor

(PECL gmagick >= Unknown)

Gmagick::setimagebackgroundcolorSets the image background color.

Descrizione

public Gmagick Gmagick::setimagebackgroundcolor ( GmagickPixel $color )

Sets the image background color.

Elenco dei parametri

color

The background pixel wand.

Valori restituiti

The Gmagick object on success

Errori/Eccezioni

Throws an GmagickException on error.



Gmagick::setimageblueprimary

(PECL gmagick >= Unknown)

Gmagick::setimageblueprimarySets the image chromaticity blue primary point.

Descrizione

public Gmagick Gmagick::setimageblueprimary ( float $x , float $y )

Sets the image chromaticity blue primary point.

Elenco dei parametri

x

The blue primary x-point.

y

The blue primary y-point.

Valori restituiti

The Gmagick object on success

Errori/Eccezioni

Throws an GmagickException on error.



Gmagick::setimagebordercolor

(PECL gmagick >= Unknown)

Gmagick::setimagebordercolorSets the image border color.

Descrizione

public Gmagick Gmagick::setimagebordercolor ( GmagickPixel $color )

Sets the image border color.

Elenco dei parametri

color

The border pixel wand.

Valori restituiti

The Gmagick object on success

Errori/Eccezioni

Throws an GmagickException on error.



Gmagick::setimagechanneldepth

(PECL gmagick >= Unknown)

Gmagick::setimagechanneldepthSets the depth of a particular image channel

Descrizione

public Gmagick Gmagick::setimagechanneldepth ( int $channel , int $depth )

Sets the depth of a particular image channel.

Elenco dei parametri

channel

Identify which channel to extract: RedChannel, GreenChannel, BlueChannel, OpacityChannel, CyanChannel, MagentaChannel, YellowChannel, BlackChannel.

depth

The image depth in bits.

Valori restituiti

The Gmagick object on success

Errori/Eccezioni

Throws an GmagickException on error.



Gmagick::setimagecolorspace

(PECL gmagick >= Unknown)

Gmagick::setimagecolorspaceSets the image colorspace

Descrizione

public Gmagick Gmagick::setimagecolorspace ( int $colorspace )

Sets the image colorspace.

Elenco dei parametri

colorspace

The image colorspace: UndefinedColorspace, RGBColorspace, GRAYColorspace, TransparentColorspace, OHTAColorspace, XYZColorspace, YCbCrColorspace, YCCColorspace, YIQColorspace, YPbPrColorspace, YPbPrColorspace, YUVColorspace, CMYKColorspace, sRGBColorspace, HSLColorspace, or HWBColorspace.

Valori restituiti

The Gmagick object on success

Errori/Eccezioni

Throws an GmagickException on error.



Gmagick::setimagecompose

(PECL gmagick >= Unknown)

Gmagick::setimagecomposeSets the image composite operator

Descrizione

public Gmagick Gmagick::setimagecompose ( int $composite )

Sets the image composite operator.

Elenco dei parametri

composite

The image composite operator.

Valori restituiti

The Gmagick object on success

Errori/Eccezioni

Throws an GmagickException on error.



Gmagick::setimagedelay

(PECL gmagick >= Unknown)

Gmagick::setimagedelaySets the image delay

Descrizione

public Gmagick Gmagick::setimagedelay ( int $delay )

Sets the image delay

Elenco dei parametri

delay

The image delay in 1/100th of a second.

Valori restituiti

The Gmagick object on success.

Errori/Eccezioni

Throws an GmagickException on error.



Gmagick::setimagedepth

(PECL gmagick >= Unknown)

Gmagick::setimagedepthSets the image depth

Descrizione

public Gmagick Gmagick::setimagedepth ( int $depth )

Sets the image depth

Elenco dei parametri

depth

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

Valori restituiti

The Gmagick object on success.

Errori/Eccezioni

Throws an GmagickException on error.



Gmagick::setimagedispose

(PECL gmagick >= Unknown)

Gmagick::setimagedisposeSets the image disposal method

Descrizione

public Gmagick Gmagick::setimagedispose ( int $disposeType )

Sets the image disposal method.

Elenco dei parametri

disposeType

The image disposal type.

Valori restituiti

The Gmagick object on success

Errori/Eccezioni

Throws an GmagickException on error.



Gmagick::setimagefilename

(PECL gmagick >= Unknown)

Gmagick::setimagefilenameSets the filename of a particular image in a sequence

Descrizione

public Gmagick Gmagick::setimagefilename ( string $filename )

Sets the filename of a particular image in a sequence.

Elenco dei parametri

filename

The image filename.

Valori restituiti

The Gmagick object on success.

Errori/Eccezioni

Throws an GmagickException on error.



Gmagick::setimageformat

(PECL gmagick >= Unknown)

Gmagick::setimageformatSets the format of a particular image

Descrizione

public Gmagick Gmagick::setimageformat ( string $imageFormat )

Sets the format of a particular image in a sequence.

Elenco dei parametri

imageFormat

The image format.

Valori restituiti

The Gmagick object on success.

Errori/Eccezioni

Throws an GmagickException on error.



Gmagick::setimagegamma

(PECL gmagick >= Unknown)

Gmagick::setimagegammaSets the image gamma

Descrizione

public Gmagick Gmagick::setimagegamma ( float $gamma )

Sets the image gamma.

Elenco dei parametri

gamma

The image gamma.

Valori restituiti

The Gmagick object on success

Errori/Eccezioni

Throws an GmagickException on error.



Gmagick::setimagegreenprimary

(PECL gmagick >= Unknown)

Gmagick::setimagegreenprimaryTSets the image chromaticity green primary point.

Descrizione

public Gmagick Gmagick::setimagegreenprimary ( float $x , float $y )

Sets the image chromaticity green primary point.

Elenco dei parametri

x

The chromaticity green primary x-point.

y

The chromaticity green primary y-point.

Valori restituiti

The Gmagick object on success.

Errori/Eccezioni

Throws an GmagickException on error.



Gmagick::setimageindex

(PECL gmagick >= Unknown)

Gmagick::setimageindexSet the iterator to the position in the image list specified with the index parameter

Descrizione

public Gmagick Gmagick::setimageindex ( int $index )

Set the iterator to the position in the image list specified with the index parameter.

Elenco dei parametri

index

The scene number.

Valori restituiti

The Gmagick object on success.

Errori/Eccezioni

Throws an GmagickException on error.



Gmagick::setimageinterlacescheme

(PECL gmagick >= Unknown)

Gmagick::setimageinterlaceschemeSets the interlace scheme of the image.

Descrizione

public Gmagick Gmagick::setimageinterlacescheme ( int $interlace )

Sets the interlace scheme of the image.

Elenco dei parametri

interlace

The image interlace scheme: NoInterlace, LineInterlace, PlaneInterlace, PartitionInterlace.

Valori restituiti

The Gmagick object on success

Errori/Eccezioni

Throws an GmagickException on error.



Gmagick::setimageiterations

(PECL gmagick >= Unknown)

Gmagick::setimageiterationsSets the image iterations.

Descrizione

public Gmagick Gmagick::setimageiterations ( int $iterations )

Sets the image iterations.

Elenco dei parametri

iterations

The image delay in 1/100th of a second.

Valori restituiti

The Gmagick object on success.

Errori/Eccezioni

Throws an GmagickException on error.



Gmagick::setimageprofile

(PECL gmagick >= Unknown)

Gmagick::setimageprofileAdds a named profile to the Gmagick object

Descrizione

public Gmagick Gmagick::setimageprofile ( string $name , string $profile )

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

Elenco dei parametri

name

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

profile

The profile.

Valori restituiti

The Gmagick object on success.

Errori/Eccezioni

Throws an GmagickException on error.



Gmagick::setimageredprimary

(PECL gmagick >= Unknown)

Gmagick::setimageredprimarySets the image chromaticity red primary point.

Descrizione

public Gmagick Gmagick::setimageredprimary ( float $x , float $y )

Sets the image chromaticity red primary point.

Elenco dei parametri

x

The red primary x-point.

y

The red primary y-point.

Valori restituiti

The Gmagick object on success.

Errori/Eccezioni

Throws an GmagickException on error.



Gmagick::setimagerenderingintent

(PECL gmagick >= Unknown)

Gmagick::setimagerenderingintentSets the image rendering intent

Descrizione

public Gmagick Gmagick::setimagerenderingintent ( int $rendering_intent )

Sets the image rendering intent.

Elenco dei parametri

rendering_intent

The image rendering intent: UndefinedIntent, SaturationIntent, PerceptualIntent, AbsoluteIntent, or RelativeIntent.

Valori restituiti

The Gmagick object on success.

Errori/Eccezioni

Throws an GmagickException on error.



Gmagick::setimageresolution

(PECL gmagick >= Unknown)

Gmagick::setimageresolutionSets the image resolution

Descrizione

public Gmagick Gmagick::setimageresolution ( float $xResolution , float $yResolution )

Sets the image resolution.

Elenco dei parametri

xResolution

The image x resolution.

yResolution

The image y resolution.

Valori restituiti

The Gmagick object on success.

Errori/Eccezioni

Throws an GmagickException on error.



Gmagick::setimagescene

(PECL gmagick >= Unknown)

Gmagick::setimagesceneSets the image scene

Descrizione

public Gmagick Gmagick::setimagescene ( int $scene )

Sets the image scene.

Elenco dei parametri

scene

The image scene number.

Valori restituiti

The Gmagick object on success.

Errori/Eccezioni

Throws an GmagickException on error.



Gmagick::setimagetype

(PECL gmagick >= Unknown)

Gmagick::setimagetypeSets the image type

Descrizione

public Gmagick Gmagick::setimagetype ( int $imgType )

Sets the image type.

Elenco dei parametri

imgType

The image type: UndefinedType, BilevelType, GrayscaleType, GrayscaleMatteType, PaletteType, PaletteMatteType, TrueColorType, TrueColorMatteType, ColorSeparationType, ColorSeparationMatteType, or OptimizeType.

Valori restituiti

The Gmagick object on success.

Errori/Eccezioni

Throws an GmagickException on error.



Gmagick::setimageunits

(PECL gmagick >= Unknown)

Gmagick::setimageunitsSets the image units of resolution.

Descrizione

public Gmagick Gmagick::setimageunits ( int $resolution )

Sets the image units of resolution.

Elenco dei parametri

resolution

The image units of resolution : Undefinedresolution, PixelsPerInchResolution, or PixelsPerCentimeterResolution.

Valori restituiti

The Gmagick object on success.

Errori/Eccezioni

Throws an GmagickException on error.



Gmagick::setimagewhitepoint

(PECL gmagick >= Unknown)

Gmagick::setimagewhitepointSets the image chromaticity white point.

Descrizione

public Gmagick Gmagick::setimagewhitepoint ( float $x , float $y )

Sets the image chromaticity white point.

Elenco dei parametri

x

The white x-point.

y

The white y-point.

Valori restituiti

The Gmagick object on success.

Errori/Eccezioni

Throws an GmagickException on error.



Gmagick::setsamplingfactors

(PECL gmagick >= Unknown)

Gmagick::setsamplingfactorsSets the image sampling factors.

Descrizione

public Gmagick Gmagick::setsamplingfactors ( array $factors )

Sets the image sampling factors.

Elenco dei parametri

factors

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

Valori restituiti

The Gmagick object on success.

Errori/Eccezioni

Throws an GmagickException on error.



Gmagick::setsize

(PECL gmagick >= Unknown)

Gmagick::setsizeSets the size of the Gmagick object

Descrizione

public Gmagick Gmagick::setsize ( int $columns , int $rows )

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

Elenco dei parametri

columns

The width in pixels.

rows

The height in pixels.

Valori restituiti

The Gmagick object on success.

Errori/Eccezioni

Throws an GmagickException on error.



Gmagick::shearimage

(PECL gmagick >= Unknown)

Gmagick::shearimageCreating a parallelogram

Descrizione

public Gmagick Gmagick::shearimage ( mixed $color , float $xShear , float $yShear )

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, x_shear is measured relative to the Y axis, and similarly, for Y direction shears y_shear is measured relative to the X axis. Empty triangles left over from shearing the image are filled with the background color.

Elenco dei parametri

color

The background pixel wand.

xShear

The number of degrees to shear the image.

yShear

The number of degrees to shear the image.

Valori restituiti

The Gmagick object on success

Errori/Eccezioni

Throws an GmagickException on error.



Gmagick::solarizeimage

(PECL gmagick >= Unknown)

Gmagick::solarizeimageApplies a solarizing effect to the image

Descrizione

public Gmagick Gmagick::solarizeimage ( int $threshold )

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.

Elenco dei parametri

threshold

Define the extent of the solarization.

Valori restituiti

The Gmagick object on success.

Errori/Eccezioni

Throws an GmagickException on error.



Gmagick::spreadimage

(PECL gmagick >= Unknown)

Gmagick::spreadimageRandomly displaces each pixel in a block

Descrizione

public Gmagick Gmagick::spreadimage ( float $radius )

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

Elenco dei parametri

radius

Choose a random pixel in a neighborhood of this extent.

Valori restituiti

The Gmagick object on success

Errori/Eccezioni

Throws an GmagickException on error.



Gmagick::stripimage

(PECL gmagick >= Unknown)

Gmagick::stripimageStrips an image of all profiles and comments

Descrizione

public Gmagick Gmagick::stripimage ( void )

Strips an image of all profiles and comments.

Elenco dei parametri

Questa funzione non contiene parametri.

Valori restituiti

The Gmagick object on success

Errori/Eccezioni

Throws an GmagickException on error.



Gmagick::swirlimage

(PECL gmagick >= Unknown)

Gmagick::swirlimageSwirls the pixels about the center of the image

Descrizione

public Gmagick Gmagick::swirlimage ( float $degrees )

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.

Elenco dei parametri

degrees

Define the tightness of the swirling effect.

Valori restituiti

The Gmagick object on success

Errori/Eccezioni

Throws an GmagickException on error.



Gmagick::thumbnailimage

(PECL gmagick >= Unknown)

Gmagick::thumbnailimageChanges the size of an image

Descrizione

public Gmagick Gmagick::thumbnailimage ( int $width , int $height [, bool $fit = false ] )

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. If TRUE is given as a third parameter then columns and rows parameters are used as maximums for each side. Both sides will be scaled down until the match or are smaller than the parameter given for the side.

Elenco dei parametri

width

Image width

height

Image height

Valori restituiti

The Gmagick object on success.

Errori/Eccezioni

Throws an GmagickException on error.



Gmagick::trimimage

(PECL gmagick >= Unknown)

Gmagick::trimimageRemove edges from the image

Descrizione

public Gmagick Gmagick::trimimage ( float $fuzz )

Remove edges that are the background color from the image.

Elenco dei parametri

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. This parameter represents the variation on the quantum range.

Valori restituiti

The Gmagick object

Errori/Eccezioni

Throws an GmagickException on error.



Gmagick::write

(PECL gmagick >= Unknown)

Gmagick::writeWrites an image to the specified filename

Descrizione

public void Gmagick::write ( string $filename )

Writes an image to the specified filename. If the filename parameter is NULL, the image is written to the filename set by Gmagick::ReadImage() or Gmagick::SetImageFilename().

Elenco dei parametri

filename

The image filename.

Valori restituiti

The Gmagick object

Errori/Eccezioni

Throws an GmagickException on error.



Gmagick::writeimage

(PECL gmagick >= Unknown)

Gmagick::writeimageWrites an image to the specified filename

Descrizione

public Gmagick Gmagick::writeimage ( string $filename [, bool $all_frames = false ] )

Writes an image to the specified filename. If the filename parameter is NULL, the image is written to the filename set by Gmagick::ReadImage() or Gmagick::SetImageFilename().

Elenco dei parametri

filename

The image filename.

Valori restituiti

The Gmagick object

Errori/Eccezioni

Throws an GmagickException on error.


Indice dei contenuti



The GmagickDraw class

(PECL gmagick >= Unknown)

Introduzione

Sommario dellla classe

GmagickDraw {
/* Metodi */
public GmagickDraw annotate ( float $x , float $y , string $text )
public GmagickDraw arc ( float $sx , float $sy , float $ex , float $ey , float $sd , float $ed )
public GmagickDraw bezier ( array $coordinate_array )
public GmagickDraw ellipse ( float $ox , float $oy , float $rx , float $ry , float $start , float $end )
public void getfillcolor ( void )
public float getfillopacity ( void )
public string getfont ( void )
public float getfontsize ( void )
public int getfontstyle ( void )
public int getfontweight ( void )
public void getstrokecolor ( void )
public float getstrokeopacity ( void )
public float getstrokewidth ( void )
public int gettextdecoration ( void )
public string gettextencoding ( void )
public GmagickDraw line ( float $sx , float $sy , float $ex , float $ey )
public GmagickDraw point ( float $x , float $y )
public GmagickDraw polygon ( array $coordinates )
public GmagickDraw polyline ( array $coordinate_array )
public GmagickDraw rectangle ( float $x1 , float $y1 , float $x2 , float $y2 )
public GmagickDraw rotate ( float $degrees )
public GmagickDraw roundrectangle ( float $x1 , float $y1 , float $x2 , float $y2 , float $rx , float $ry )
public GmagickDraw scale ( float $x , float $y )
public GmagickDraw setfillcolor ( string $color )
public GmagickDraw setfillopacity ( float $fill_opacity )
public GmagickDraw setfont ( string $font )
public GmagickDraw setfontsize ( float $pointsize )
public GmagickDraw setfontstyle ( int $style )
public GmagickDraw setfontweight ( int $weight )
public GmagickDraw setstrokecolor ( GmagickPixel $color )
public GmagickDraw setstrokeopacity ( float $stroke_opacity )
public GmagickDraw setstrokewidth ( float $width )
public GmagickDraw settextdecoration ( int $decoration )
public GmagickDraw settextencoding ( string $encoding )
}

GmagickDraw::annotate

(PECL gmagick >= Unknown)

GmagickDraw::annotateDraws text on the image

Descrizione

public GmagickDraw GmagickDraw::annotate ( float $x , float $y , string $text )

Draws text on the image.

Elenco dei parametri

x

x ordinate to left of text

y

y ordinate to text baseline

text

text to draw

Valori restituiti

The GmagickDraw object on success.



GmagickDraw::arc

(PECL gmagick >= Unknown)

GmagickDraw::arcDraws an arc

Descrizione

public GmagickDraw GmagickDraw::arc ( float $sx , float $sy , float $ex , float $ey , float $sd , float $ed )

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

Elenco dei parametri

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

Valori restituiti

The GmagickDraw object on success.



GmagickDraw::bezier

(PECL gmagick >= Unknown)

GmagickDraw::bezierDraws a bezier curve

Descrizione

public GmagickDraw GmagickDraw::bezier ( array $coordinate_array )

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

Elenco dei parametri

coordinate_array

Coordinates array

Valori restituiti

The GmagickDraw object on success



GmagickDraw::ellipse

(PECL gmagick >= Unknown)

GmagickDraw::ellipseDraws an ellipse on the image

Descrizione

public GmagickDraw GmagickDraw::ellipse ( float $ox , float $oy , float $rx , float $ry , float $start , float $end )

Draws an ellipse on the image.

Elenco dei parametri

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

Valori restituiti

The GmagickDraw object on success



GmagickDraw::getfillcolor

(PECL gmagick >= Unknown)

GmagickDraw::getfillcolorReturns the fill color

Descrizione

public void GmagickDraw::getfillcolor ( void )

Returns the fill color used for drawing filled objects.

Elenco dei parametri

Questa funzione non contiene parametri.

Valori restituiti

The GmagickPixel fill color used for drawing filled objects.



GmagickDraw::getfillopacity

(PECL gmagick >= Unknown)

GmagickDraw::getfillopacityReturns the opacity used when drawing

Descrizione

public float GmagickDraw::getfillopacity ( void )

Returns the opacity used when drawing

Elenco dei parametri

Questa funzione non contiene parametri.

Valori restituiti

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



GmagickDraw::getfont

(PECL gmagick >= Unknown)

GmagickDraw::getfontReturns the font

Descrizione

public string GmagickDraw::getfont ( void )

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

Elenco dei parametri

Questa funzione non contiene parametri.

Valori restituiti

Returns a string on success and false if no font is set.



GmagickDraw::getfontsize

(PECL gmagick >= Unknown)

GmagickDraw::getfontsizeReturns the font pointsize

Descrizione

public float GmagickDraw::getfontsize ( void )

Returns the font pointsize used when annotating with text.

Elenco dei parametri

Questa funzione non contiene parametri.

Valori restituiti

Returns the font size associated with the current GmagickDraw object.



GmagickDraw::getfontstyle

(PECL gmagick >= Unknown)

GmagickDraw::getfontstyleReturns the font style

Descrizione

public int GmagickDraw::getfontstyle ( void )

Returns the font style used when annotating with text.

Elenco dei parametri

Questa funzione non contiene parametri.

Valori restituiti

Returns the font style constant (STYLE_) associated with the GmagickDraw object or 0 if no style is set.



GmagickDraw::getfontweight

(PECL gmagick >= Unknown)

GmagickDraw::getfontweightReturns the font weight

Descrizione

public int GmagickDraw::getfontweight ( void )

Returns the font weight used when annotating with text.

Elenco dei parametri

Questa funzione non contiene parametri.

Valori restituiti

Returns an int on success and 0 if no weight is set.



GmagickDraw::getstrokecolor

(PECL gmagick >= Unknown)

GmagickDraw::getstrokecolorReturns the color used for stroking object outlines

Descrizione

public void GmagickDraw::getstrokecolor ( void )

Returns the color used for stroking object outlines.

Elenco dei parametri

Questa funzione non contiene parametri.

Valori restituiti

Returns an GmagickPixel object which describes the color



GmagickDraw::getstrokeopacity

(PECL gmagick >= Unknown)

GmagickDraw::getstrokeopacityReturns the opacity of stroked object outlines

Descrizione

public float GmagickDraw::getstrokeopacity ( void )

Returns the opacity of stroked object outlines.

Elenco dei parametri

Questa funzione non contiene parametri.

Valori restituiti

Returns a double describing the opacity.



GmagickDraw::getstrokewidth

(PECL gmagick >= Unknown)

GmagickDraw::getstrokewidthReturns the width of the stroke used to draw object outlines

Descrizione

public float GmagickDraw::getstrokewidth ( void )

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

Elenco dei parametri

Questa funzione non contiene parametri.

Valori restituiti

Returns a double describing the stroke width.



GmagickDraw::gettextdecoration

(PECL gmagick >= Unknown)

GmagickDraw::gettextdecorationReturns the text decoration

Descrizione

public int GmagickDraw::gettextdecoration ( void )

Returns the decoration applied when annotating with text.

Elenco dei parametri

Questa funzione non contiene parametri.

Valori restituiti

Returns one of the DECORATION_ constants and 0 if no decoration is set.



GmagickDraw::gettextencoding

(PECL gmagick >= Unknown)

GmagickDraw::gettextencodingReturns the code set used for text annotations

Descrizione

public string GmagickDraw::gettextencoding ( void )

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

Elenco dei parametri

Questa funzione non contiene parametri.

Valori restituiti

Returns a string specifying the code set or false if text encoding is not set.



GmagickDraw::line

(PECL gmagick >= Unknown)

GmagickDraw::lineThe line purpose

Descrizione

public GmagickDraw GmagickDraw::line ( float $sx , float $sy , float $ex , float $ey )

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

Elenco dei parametri

sx

starting x ordinate

sy

starting y ordinate

ex

ending x ordinate

ey

ending y ordinate

Valori restituiti

The GmagickDraw object on success



GmagickDraw::point

(PECL gmagick >= Unknown)

GmagickDraw::pointDraws a point

Descrizione

public GmagickDraw GmagickDraw::point ( float $x , float $y )

Draws a point using the current stroke color and stroke thickness at the specified coordinates.

Elenco dei parametri

x

target x coordinate

y

target y coordinate

Valori restituiti

The GmagickDraw object on success



GmagickDraw::polygon

(PECL gmagick >= Unknown)

GmagickDraw::polygonDraws a polygon

Descrizione

public GmagickDraw GmagickDraw::polygon ( array $coordinates )

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

Elenco dei parametri

coordinates

coordinate array

Valori restituiti

The GmagickDraw object on success



GmagickDraw::polyline

(PECL gmagick >= Unknown)

GmagickDraw::polylineDraws a polyline

Descrizione

public GmagickDraw GmagickDraw::polyline ( array $coordinate_array )

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

Elenco dei parametri

coordinate_array

The array of coordinates

Valori restituiti

The GmagickDraw object on success



GmagickDraw::rectangle

(PECL gmagick >= Unknown)

GmagickDraw::rectangleDraws a rectangle

Descrizione

public GmagickDraw GmagickDraw::rectangle ( float $x1 , float $y1 , float $x2 , float $y2 )

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

Elenco dei parametri

x1

x ordinate of first coordinate

y1

y ordinate of first coordinate

x2

x ordinate of second coordinate

y2

y ordinate of second coordinate

Valori restituiti

The GmagickDraw object on success



GmagickDraw::rotate

(PECL gmagick >= Unknown)

GmagickDraw::rotateApplies the specified rotation to the current coordinate space

Descrizione

public GmagickDraw GmagickDraw::rotate ( float $degrees )

Applies the specified rotation to the current coordinate space.

Elenco dei parametri

degrees

degrees of rotation

Valori restituiti

The GmagickDraw object on success



GmagickDraw::roundrectangle

(PECL gmagick >= Unknown)

GmagickDraw::roundrectangleDraws a rounded rectangle

Descrizione

public GmagickDraw GmagickDraw::roundrectangle ( float $x1 , float $y1 , float $x2 , float $y2 , float $rx , float $ry )

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

Elenco dei parametri

x1

x ordinate of first coordinate

y1

y ordinate of first coordinate

x2

x ordinate of second coordinate

y2

y ordinate of second coordinate

rx

radius of corner in horizontal direction

ry

radius of corner in vertical direction

Valori restituiti

The GmagickDraw object on success



GmagickDraw::scale

(PECL gmagick >= Unknown)

GmagickDraw::scaleAdjusts the scaling factor

Descrizione

public GmagickDraw GmagickDraw::scale ( float $x , float $y )

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

Elenco dei parametri

x

horizontal scale factor

y

vertical scale factor

Valori restituiti

The GmagickDraw object on success



GmagickDraw::setfillcolor

(PECL gmagick >= Unknown)

GmagickDraw::setfillcolorSets the fill color to be used for drawing filled objects.

Descrizione

public GmagickDraw GmagickDraw::setfillcolor ( string $color )

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

Elenco dei parametri

color

GmagickPixel indicating color to use for filling.

Valori restituiti

The GmagickDraw object on success



GmagickDraw::setfillopacity

(PECL gmagick >= Unknown)

GmagickDraw::setfillopacityThe setfillopacity purpose

Descrizione

public GmagickDraw GmagickDraw::setfillopacity ( float $fill_opacity )

Sets the opacity to use when drawing using the fill color or fill texture. Setting it to 1.0 will make fill full opaque.

Elenco dei parametri

fill_opacity

Fill opacity

Valori restituiti

The GmagickDraw object on success



GmagickDraw::setfont

(PECL gmagick >= Unknown)

GmagickDraw::setfontSets the fully-specified font to use when annotating with text.

Descrizione

public GmagickDraw GmagickDraw::setfont ( string $font )

Sets the fully-specified font to use when annotating with text

Elenco dei parametri

font

font name

Valori restituiti

The GmagickDraw object on success



GmagickDraw::setfontsize

(PECL gmagick >= Unknown)

GmagickDraw::setfontsizeSets the font pointsize to use when annotating with text.

Descrizione

public GmagickDraw GmagickDraw::setfontsize ( float $pointsize )

Sets the font pointsize to use when annotating with text.

Elenco dei parametri

pointsize

Text pointsize

Valori restituiti

The GmagickDraw object on success



GmagickDraw::setfontstyle

(PECL gmagick >= Unknown)

GmagickDraw::setfontstyleSets the font style to use when annotating with text

Descrizione

public GmagickDraw GmagickDraw::setfontstyle ( int $style )

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

Elenco dei parametri

style

Font style (NormalStyle, ItalicStyle, ObliqueStyle, AnyStyle)

Valori restituiti

The GmagickDraw object on success



GmagickDraw::setfontweight

(PECL gmagick >= Unknown)

GmagickDraw::setfontweightSets the font weight

Descrizione

public GmagickDraw GmagickDraw::setfontweight ( int $weight )

Sets the font weight to use when annotating with text.

Elenco dei parametri

weight

Font weight (valid range 100-900)

Valori restituiti

The GmagickDraw object on success



GmagickDraw::setstrokecolor

(PECL gmagick >= Unknown)

GmagickDraw::setstrokecolorSets the color used for stroking object outlines.

Descrizione

public GmagickDraw GmagickDraw::setstrokecolor ( GmagickPixel $color )

Sets the color used for stroking object outlines.

Elenco dei parametri

color

GmagickPixel representing the color for the stroke.

Valori restituiti

The GmagickDraw object on success



GmagickDraw::setstrokeopacity

(PECL gmagick >= Unknown)

GmagickDraw::setstrokeopacitySpecifies the opacity of stroked object outlines.

Descrizione

public GmagickDraw GmagickDraw::setstrokeopacity ( float $stroke_opacity )

Specifies the opacity of stroked object outlines.

Elenco dei parametri

stroke_opacity

Stroke opacity. The value 1.0 is opaque.

Valori restituiti

The GmagickDraw object on success



GmagickDraw::setstrokewidth

(PECL gmagick >= Unknown)

GmagickDraw::setstrokewidthSets the width of the stroke used to draw object outlines.

Descrizione

public GmagickDraw GmagickDraw::setstrokewidth ( float $width )

Sets the width of the stroke used to draw object outlines

Elenco dei parametri

width

Stroke width

Valori restituiti

The GmagickDraw object on success



GmagickDraw::settextdecoration

(PECL gmagick >= Unknown)

GmagickDraw::settextdecorationSpecifies a decoration

Descrizione

public GmagickDraw GmagickDraw::settextdecoration ( int $decoration )

Specifies a decoration to be applied when annotating with text.

Elenco dei parametri

int

Text decoration. One of NoDecoration, UnderlineDecoration, OverlineDecoration, or LineThroughDecoration

Valori restituiti

The GmagickDraw object on success



GmagickDraw::settextencoding

(PECL gmagick >= Unknown)

GmagickDraw::settextencodingSpecifies specifies the text code set

Descrizione

public GmagickDraw GmagickDraw::settextencoding ( string $encoding )

Specifies 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.

Elenco dei parametri

encoding

Character string specifying text encoding

Valori restituiti

The GmagickDraw object on success


Indice dei contenuti



The GmagickPixel class

(PECL gmagick >= Unknown)

Introduzione

Sommario dellla classe

GmagickPixel {
/* Metodi */
public __construct ([ string $color ] )
public mixed getcolor ([ bool $as_array [, bool $normalize_array ]] )
public int getcolorcount ( void )
public float getcolorvalue ( int $color )
public GmagickPixel setcolor ( string $color )
public GmagickPixel setcolorvalue ( int $color , float $value )
}

GmagickPixel::__construct

(PECL gmagick >= Unknown)

GmagickPixel::__constructThe GmagickPixel constructor

Descrizione

public GmagickPixel::__construct ([ string $color ] )

Constructs an GmagickPixel object. If a color is specified, the object is constructed and then initialised with that color before being returned.

Elenco dei parametri

color

The optional color string to use as the initial value of this object.

Valori restituiti

The GmagickPixel object on success.



GmagickPixel::getcolor

(PECL gmagick >= Unknown)

GmagickPixel::getcolorReturns the color

Descrizione

public mixed GmagickPixel::getcolor ([ bool $as_array [, bool $normalize_array ]] )

Returns the color described by the GmagickPixel object, as an array. If the color has an opacity channel set, this is provided as a fourth value in the list.

Elenco dei parametri

as_array

True to indicate return of array instead of string

normalize_array

Normalize the color values

Valori restituiti

An array of channel values, each normalized if TRUE is given as param. Throws GmagickPixelException on error.



GmagickPixel::getcolorcount

(PECL gmagick >= Unknown)

GmagickPixel::getcolorcountReturns the color count associated with this color

Descrizione

public int GmagickPixel::getcolorcount ( void )

Returns the color count associated with this color

Elenco dei parametri

Questa funzione non contiene parametri.

Valori restituiti

Returns the color count as an integer on success, throws GmagickPixelException on failure.



GmagickPixel::getcolorvalue

(PECL gmagick >= Unknown)

GmagickPixel::getcolorvalueGets the normalized value of the provided color channel

Descrizione

public float GmagickPixel::getcolorvalue ( int $color )

Retrieves the value of the color channel specified, as a floating-point number between 0 and 1.

Elenco dei parametri

color

The channel to check, specified as one of the Gmagick channel constants.

Valori restituiti

The value of the channel, as a normalized floating-point number, throwing GmagickPixelException on error.



GmagickPixel::setcolor

(PECL gmagick >= Unknown)

GmagickPixel::setcolorSets the color

Descrizione

public GmagickPixel GmagickPixel::setcolor ( string $color )

Sets the color described by the GmagickPixel object, with a string (e.g. "blue", "#0000ff", "rgb(0,0,255)", "cmyk(100,100,100,10)", etc.).

Elenco dei parametri

color

The color definition to use in order to initialise the GmagickPixel object.

Valori restituiti

The GmagickPixel object on success.



GmagickPixel::setcolorvalue

(PECL gmagick >= Unknown)

GmagickPixel::setcolorvalueSets the normalized value of one of the channels

Descrizione

public GmagickPixel GmagickPixel::setcolorvalue ( int $color , float $value )

Sets the value of the specified channel of this object to the provided value, which should be between 0 and 1. This function can be used to provide an opacity channel to a GmagickPixel object.

Elenco dei parametri

color

One of the Gmagick channel color constants.

value

The value to set this channel to, ranging from 0 to 1.

Valori restituiti

The GmagickPixel object on success.


Indice dei contenuti




Image Processing (ImageMagick)


Introduzione

Imagick is a native php extension to create and modify images using the ImageMagick API.

ImageMagick® is a software suite to create, edit, and compose bitmap images.. It can read, convert and write images in a variety of formats (over 100) including DPX, EXR, GIF, JPEG, JPEG-2000, PDF, PhotoCD, PNG, Postscript, SVG, and TIFF.

Copyright 1999-2007 ImageMagick Studio LLC, a non-profit organization dedicated to making software imaging solutions freely available.



Installazione/Configurazione

Indice dei contenuti


Requisiti

Installation requirements on Windows

Version information does not differ from that above. There are binaries available from http://www.imagemagick.org/ so that you can load this extension on Windows without need for a compiler.

Installation requirements on other platforms

PHP >= 5.1.3 and ImageMagick >= 6.2.4 is required. The amount of formats supported is by Imagick is entirely dependent upon the amount of formats supported by your ImageMagick installation. For example, Imagemagick requires ghostscript to conduct PDF operations.



Installazione

Questa estensione » PECL non è incorporata nel PHP.

Informazioni per l'installazione di questa estensione PECL possono essere trovate nel capitolo del manuale intitolato Installazione delle estensioni PECL. Informazioni aggiuntive come nuove release, download, file sorgenti, informazioni del manutentore e un CHANGELOG possono essere trovate qui: » http://pecl.php.net/package/imagick.

Nota: The official name of this extension is imagick.

Windows users can download prebuilt DLL from the » PECL website.



Configurazione di Runtime

Il comportamento di queste funzioni è influenzato dalle impostazioni di php.ini.

Imagick configuration options
Nome Default Modificabile Storico dei cambiamenti
imagick.locale_fix FALSE PHP_INI_ALL Available since Imagick 2.1.0
imagick.progress_monitor FALSE PHP_INI_SYSTEM Available since Imagick 2.2.2
Per maggiori dettagli e definizioni sui modi PHP_INI_*, vedere Where a configuration setting may be set.

Breve descrizione dei parametri di configurazione.

imagick.locale_fix boolean

Fixes a drawing bug with locales that use ',' as float separators.

imagick.progress_monitor boolean

Used to enable the image progress monitor.



Tipi di risorse

Questa estensione non definisce alcun tipo di risorsa.




Costanti predefinite

Queste costanti sono definite da questa estensione e sono disponibili solo se l'estensione è stata compilata nel PHP o se è stata caricata dinamicamente a runtime.

COLOR_* constants

Colortype constants. These constants are mainly used with ImagickPixel.

imagick::COLOR_BLACK (integer)
Black color
imagick::COLOR_BLUE (integer)
Blue color
imagick::COLOR_CYAN (integer)
Cyan color
imagick::COLOR_GREEN (integer)
Green color
imagick::COLOR_RED (integer)
Red color
imagick::COLOR_YELLOW (integer)
Yellow color
imagick::COLOR_MAGENTA (integer)
Magenta color
imagick::COLOR_OPACITY (integer)
Color's opacity
imagick::COLOR_ALPHA (integer)
Color's alpha
imagick::COLOR_FUZZ (integer)
Color's fuzz
DISPOSE constants

Dispose type constants

imagick::DISPOSE_UNRECOGNIZED (integer)
Unrecognized dispose type
imagick::DISPOSE_UNDEFINED (integer)
Undefined dispose type
imagick::DISPOSE_NONE (integer)
No dispose type defined
imagick::DISPOSE_BACKGROUND (integer)
Dispose background
imagick::DISPOSE_PREVIOUS (integer)
Dispose previous
Composite Operator Constants
imagick::COMPOSITE_DEFAULT (integer)
The default composite operator
imagick::COMPOSITE_UNDEFINED (integer)
Undefined composite operator
imagick::COMPOSITE_NO (integer)
No composite operator defined
imagick::COMPOSITE_ADD (integer)
The result of image + image
imagick::COMPOSITE_ATOP (integer)
The result is the same shape as image, with composite image obscuring image where the image shapes overlap
imagick::COMPOSITE_BLEND (integer)
Blends the image
imagick::COMPOSITE_BUMPMAP (integer)
The same as COMPOSITE_MULTIPLY, except the source is converted to grayscale first.
imagick::COMPOSITE_CLEAR (integer)
Makes the target image transparent
imagick::COMPOSITE_COLORBURN (integer)
Darkens the destination image to reflect the source image
imagick::COMPOSITE_COLORDODGE (integer)
Brightens the destination image to reflect the source image
imagick::COMPOSITE_COLORIZE (integer)
Colorizes the target image using the composite image
imagick::COMPOSITE_COPYBLACK (integer)
Copies black from the source to target
imagick::COMPOSITE_COPYBLUE (integer)
Copies blue from the source to target
imagick::COMPOSITE_COPY (integer)
Copies the source image on the target image
imagick::COMPOSITE_COPYCYAN (integer)
Copies cyan from the source to target
imagick::COMPOSITE_COPYGREEN (integer)
Copies green from the source to target
imagick::COMPOSITE_COPYMAGENTA (integer)
Copies magenta from the source to target
imagick::COMPOSITE_COPYOPACITY (integer)
Copies opacity from the source to target
imagick::COMPOSITE_COPYRED (integer)
Copies red from the source to target
imagick::COMPOSITE_COPYYELLOW (integer)
Copies yellow from the source to target
imagick::COMPOSITE_DARKEN (integer)
Darkens the target image
imagick::COMPOSITE_DSTATOP (integer)
The part of the destination lying inside of the source is composited over the source and replaces the destination
imagick::COMPOSITE_DST (integer)
The target is left untouched
imagick::COMPOSITE_DSTIN (integer)
The parts inside the source replace the target
imagick::COMPOSITE_DSTOUT (integer)
The parts outside the source replace the target
imagick::COMPOSITE_DSTOVER (integer)
Target replaces the source
imagick::COMPOSITE_DIFFERENCE (integer)
Subtracts the darker of the two constituent colors from the lighter
imagick::COMPOSITE_DISPLACE (integer)
Shifts target image pixels as defined by the source
imagick::COMPOSITE_DISSOLVE (integer)
Dissolves the source in to the target
imagick::COMPOSITE_EXCLUSION (integer)
Produces an effect similar to that of imagick::COMPOSITE_DIFFERENCE, but appears as lower contrast
imagick::COMPOSITE_HARDLIGHT (integer)
Multiplies or screens the colors, dependent on the source color value
imagick::COMPOSITE_HUE (integer)
Modifies the hue of the target as defined by source
imagick::COMPOSITE_IN (integer)
Composites source into the target
imagick::COMPOSITE_LIGHTEN (integer)
Lightens the target as defined by source
imagick::COMPOSITE_LUMINIZE (integer)
Luminizes the target as defined by source
imagick::COMPOSITE_MINUS (integer)
Subtracts the source from the target
imagick::COMPOSITE_MODULATE (integer)
Modulates the target brightness, saturation and hue as defined by source
imagick::COMPOSITE_MULTIPLY (integer)
Multiplies the target to the source
imagick::COMPOSITE_OUT (integer)
Composites outer parts of the source on the target
imagick::COMPOSITE_OVER (integer)
Composites source over the target
imagick::COMPOSITE_OVERLAY (integer)
Overlays the source on the target
imagick::COMPOSITE_PLUS (integer)
Adds the source to the target
imagick::COMPOSITE_REPLACE (integer)
Replaces the target with the source
imagick::COMPOSITE_SATURATE (integer)
Saturates the target as defined by the source
imagick::COMPOSITE_SCREEN (integer)
The source and destination are complemented and then multiplied and then replace the destination
imagick::COMPOSITE_SOFTLIGHT (integer)
Darkens or lightens the colors, dependent on the source
imagick::COMPOSITE_SRCATOP (integer)
The part of the source lying inside of the destination is composited onto the destination
imagick::COMPOSITE_SRC (integer)
The source is copied to the destination
imagick::COMPOSITE_SRCIN (integer)
The part of the source lying inside of the destination replaces the destination
imagick::COMPOSITE_SRCOUT (integer)
The part of the source lying outside of the destination replaces the destination
imagick::COMPOSITE_SRCOVER (integer)
The source replaces the destination
imagick::COMPOSITE_SUBTRACT (integer)
Subtract the colors in the source image from the destination image
imagick::COMPOSITE_THRESHOLD (integer)
The source is composited on the target as defined by source threshold
imagick::COMPOSITE_XOR (integer)
The part of the source that lies outside of the destination is combined with the part of the destination that lies outside of the source
MONTAGEMODE constants

imagick::MONTAGEMODE_FRAME (integer)
imagick::MONTAGEMODE_UNFRAME (integer)
imagick::MONTAGEMODE_CONCATENATE (integer)
STYLE constants

imagick::STYLE_NORMAL (integer)
imagick::STYLE_ITALIC (integer)
imagick::STYLE_OBLIQUE (integer)
imagick::STYLE_ANY (integer)
FILTER constants

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)
IMGTYPE constants

imagick::IMGTYPE_UNDEFINED (integer)
imagick::IMGTYPE_BILEVEL (integer)
imagick::IMGTYPE_GRAYSCALE (integer)
imagick::IMGTYPE_GRAYSCALEMATTE (integer)
imagick::IMGTYPE_PALETTE (integer)
imagick::IMGTYPE_PALETTEMATTE (integer)
imagick::IMGTYPE_TRUECOLOR (integer)
imagick::IMGTYPE_TRUECOLORMATTE (integer)
imagick::IMGTYPE_COLORSEPARATION (integer)
imagick::IMGTYPE_COLORSEPARATIONMATTE (integer)
imagick::IMGTYPE_OPTIMIZE (integer)
RESOLUTION constants

imagick::RESOLUTION_UNDEFINED (integer)
imagick::RESOLUTION_PIXELSPERINCH (integer)
imagick::RESOLUTION_PIXELSPERCENTIMETER (integer)
COMPRESSION constants

imagick::COMPRESSION_UNDEFINED (integer)
imagick::COMPRESSION_NO (integer)
imagick::COMPRESSION_BZIP (integer)
imagick::COMPRESSION_FAX (integer)
imagick::COMPRESSION_GROUP4 (integer)
imagick::COMPRESSION_JPEG (integer)
imagick::COMPRESSION_JPEG2000 (integer)
imagick::COMPRESSION_LOSSLESSJPEG (integer)
imagick::COMPRESSION_LZW (integer)
imagick::COMPRESSION_RLE (integer)
imagick::COMPRESSION_ZIP (integer)
imagick::COMPRESSION_DXT1 (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.0 or higher.
imagick::COMPRESSION_DXT3 (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.0 or higher.
imagick::COMPRESSION_DXT5 (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.0 or higher.
PAINT constants

imagick::PAINT_POINT (integer)
imagick::PAINT_REPLACE (integer)
imagick::PAINT_FLOODFILL (integer)
imagick::PAINT_FILLTOBORDER (integer)
imagick::PAINT_RESET (integer)
GRAVITY constants

imagick::GRAVITY_NORTHWEST (integer)
imagick::GRAVITY_NORTH (integer)
imagick::GRAVITY_NORTHEAST (integer)
imagick::GRAVITY_WEST (integer)
imagick::GRAVITY_CENTER (integer)
imagick::GRAVITY_EAST (integer)
imagick::GRAVITY_SOUTHWEST (integer)
imagick::GRAVITY_SOUTH (integer)
imagick::GRAVITY_SOUTHEAST (integer)
STRETCH constants

imagick::STRETCH_NORMAL (integer)
imagick::STRETCH_ULTRACONDENSED (integer)
imagick::STRETCH_CONDENSED (integer)
imagick::STRETCH_SEMICONDENSED (integer)
imagick::STRETCH_SEMIEXPANDED (integer)
imagick::STRETCH_EXPANDED (integer)
imagick::STRETCH_EXTRAEXPANDED (integer)
imagick::STRETCH_ULTRAEXPANDED (integer)
imagick::STRETCH_ANY (integer)
ALIGN constants

imagick::ALIGN_UNDEFINED (integer)
imagick::ALIGN_LEFT (integer)
imagick::ALIGN_CENTER (integer)
imagick::ALIGN_RIGHT (integer)
DECORATION constants

imagick::DECORATION_NO (integer)
imagick::DECORATION_UNDERLINE (integer)
imagick::DECORATION_OVERLINE (integer)
imagick::DECORATION_LINETROUGH (integer)
NOISE constants

imagick::NOISE_UNIFORM (integer)
imagick::NOISE_GAUSSIAN (integer)
imagick::NOISE_MULTIPLICATIVEGAUSSIAN (integer)
imagick::NOISE_IMPULSE (integer)
imagick::NOISE_LAPLACIAN (integer)
imagick::NOISE_POISSON (integer)
imagick::NOISE_RANDOM (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.6 or higher.
CHANNEL constants

imagick::CHANNEL_UNDEFINED (integer)
imagick::CHANNEL_RED (integer)
imagick::CHANNEL_GRAY (integer)
imagick::CHANNEL_CYAN (integer)
imagick::CHANNEL_GREEN (integer)
imagick::CHANNEL_MAGENTA (integer)
imagick::CHANNEL_BLUE (integer)
imagick::CHANNEL_YELLOW (integer)
imagick::CHANNEL_ALPHA (integer)
imagick::CHANNEL_OPACITY (integer)
imagick::CHANNEL_MATTE (integer)
imagick::CHANNEL_BLACK (integer)
imagick::CHANNEL_INDEX (integer)
imagick::CHANNEL_ALL (integer)
imagick::CHANNEL_DEFAULT (integer)
METRIC constants

imagick::METRIC_UNDEFINED (integer)
imagick::METRIC_MEANABSOLUTEERROR (integer)
imagick::METRIC_MEANSQUAREERROR (integer)
imagick::METRIC_PEAKABSOLUTEERROR (integer)
imagick::METRIC_PEAKSIGNALTONOISERATIO (integer)
imagick::METRIC_ROOTMEANSQUAREDERROR (integer)
PIXEL constants

imagick::PIXEL_CHAR (integer)
imagick::PIXEL_DOUBLE (integer)
imagick::PIXEL_FLOAT (integer)
imagick::PIXEL_INTEGER (integer)
imagick::PIXEL_LONG (integer)
imagick::PIXEL_QUANTUM (integer)
imagick::PIXEL_SHORT (integer)
EVALUATE constants

imagick::EVALUATE_UNDEFINED (integer)
imagick::EVALUATE_ADD (integer)
imagick::EVALUATE_AND (integer)
imagick::EVALUATE_DIVIDE (integer)
imagick::EVALUATE_LEFTSHIFT (integer)
imagick::EVALUATE_MAX (integer)
imagick::EVALUATE_MIN (integer)
imagick::EVALUATE_MULTIPLY (integer)
imagick::EVALUATE_OR (integer)
imagick::EVALUATE_RIGHTSHIFT (integer)
imagick::EVALUATE_SET (integer)
imagick::EVALUATE_SUBTRACT (integer)
imagick::EVALUATE_XOR (integer)
imagick::EVALUATE_POW (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.4 or higher.
imagick::EVALUATE_LOG (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.4 or higher.
imagick::EVALUATE_THRESHOLD (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.4 or higher.
imagick::EVALUATE_THRESHOLDBLACK (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.4 or higher.
imagick::EVALUATE_THRESHOLDWHITE (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.4 or higher.
imagick::EVALUATE_GAUSSIANNOISE (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.4 or higher.
imagick::EVALUATE_IMPULSENOISE (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.4 or higher.
imagick::EVALUATE_LAPLACIANNOISE (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.4 or higher.
imagick::EVALUATE_MULTIPLICATIVENOISE (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.4 or higher.
imagick::EVALUATE_POISSONNOISE (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.4 or higher.
imagick::EVALUATE_UNIFORMNOISE (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.4 or higher.
imagick::EVALUATE_COSINE (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.4 or higher.
imagick::EVALUATE_SINE (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.4 or higher.
imagick::EVALUATE_ADDMODULUS (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.4 or higher.
COLORSPACE constants

imagick::COLORSPACE_UNDEFINED (integer)
imagick::COLORSPACE_RGB (integer)
imagick::COLORSPACE_GRAY (integer)
imagick::COLORSPACE_TRANSPARENT (integer)
imagick::COLORSPACE_OHTA (integer)
imagick::COLORSPACE_LAB (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::COLORSPACE_HSB (integer)
imagick::COLORSPACE_HSL (integer)
imagick::COLORSPACE_HWB (integer)
imagick::COLORSPACE_REC601LUMA (integer)
imagick::COLORSPACE_REC709LUMA (integer)
imagick::COLORSPACE_LOG (integer)
imagick::COLORSPACE_CMY (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.2 or higher.
VIRTUALPIXELMETHOD constants

imagick::VIRTUALPIXELMETHOD_UNDEFINED (integer)
imagick::VIRTUALPIXELMETHOD_BACKGROUND (integer)
imagick::VIRTUALPIXELMETHOD_CONSTANT (integer)
imagick::VIRTUALPIXELMETHOD_EDGE (integer)
imagick::VIRTUALPIXELMETHOD_MIRROR (integer)
imagick::VIRTUALPIXELMETHOD_TILE (integer)
imagick::VIRTUALPIXELMETHOD_TRANSPARENT (integer)
imagick::VIRTUALPIXELMETHOD_MASK (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.2 or higher.
imagick::VIRTUALPIXELMETHOD_BLACK (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.2 or higher.
imagick::VIRTUALPIXELMETHOD_GRAY (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.2 or higher.
imagick::VIRTUALPIXELMETHOD_WHITE (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.2 or higher.
imagick::VIRTUALPIXELMETHOD_HORIZONTALTILE (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.3 or higher.
imagick::VIRTUALPIXELMETHOD_VERTICALTILE (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.3 or higher.
PREVIEW constants

imagick::PREVIEW_UNDEFINED (integer)
imagick::PREVIEW_ROTATE (integer)
imagick::PREVIEW_SHEAR (integer)
imagick::PREVIEW_ROLL (integer)
imagick::PREVIEW_HUE (integer)
imagick::PREVIEW_SATURATION (integer)
imagick::PREVIEW_BRIGHTNESS (integer)
imagick::PREVIEW_GAMMA (integer)
imagick::PREVIEW_SPIFF (integer)
imagick::PREVIEW_DULL (integer)
imagick::PREVIEW_GRAYSCALE (integer)
imagick::PREVIEW_QUANTIZE (integer)
imagick::PREVIEW_DESPECKLE (integer)
imagick::PREVIEW_REDUCENOISE (integer)
imagick::PREVIEW_ADDNOISE (integer)
imagick::PREVIEW_SHARPEN (integer)
imagick::PREVIEW_BLUR (integer)
imagick::PREVIEW_THRESHOLD (integer)
imagick::PREVIEW_EDGEDETECT (integer)
imagick::PREVIEW_SPREAD (integer)
imagick::PREVIEW_SOLARIZE (integer)
imagick::PREVIEW_SHADE (integer)
imagick::PREVIEW_RAISE (integer)
imagick::PREVIEW_SEGMENT (integer)
imagick::PREVIEW_SWIRL (integer)
imagick::PREVIEW_IMPLODE (integer)
imagick::PREVIEW_WAVE (integer)
imagick::PREVIEW_OILPAINT (integer)
imagick::PREVIEW_CHARCOALDRAWING (integer)
imagick::PREVIEW_JPEG (integer)
RENDERINGINTENT constants

imagick::RENDERINGINTENT_UNDEFINED (integer)
imagick::RENDERINGINTENT_SATURATION (integer)
imagick::RENDERINGINTENT_PERCEPTUAL (integer)
imagick::RENDERINGINTENT_ABSOLUTE (integer)
imagick::RENDERINGINTENT_RELATIVE (integer)
INTERLACE constants

imagick::INTERLACE_UNDEFINED (integer)
imagick::INTERLACE_NO (integer)
imagick::INTERLACE_LINE (integer)
imagick::INTERLACE_PLANE (integer)
imagick::INTERLACE_PARTITION (integer)
imagick::INTERLACE_GIF (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.4 or higher.
imagick::INTERLACE_JPEG (integer)
imagick::INTERLACE_PNG (integer)
FILLRULE constants

imagick::FILLRULE_UNDEFINED (integer)
imagick::FILLRULE_EVENODD (integer)
imagick::FILLRULE_NONZERO (integer)
PATHUNITS constants

imagick::PATHUNITS_UNDEFINED (integer)
imagick::PATHUNITS_USERSPACE (integer)
imagick::PATHUNITS_USERSPACEONUSE (integer)
imagick::PATHUNITS_OBJECTBOUNDINGBOX (integer)
LINECAP constants

imagick::LINECAP_UNDEFINED (integer)
imagick::LINECAP_BUTT (integer)
imagick::LINECAP_ROUND (integer)
imagick::LINECAP_SQUARE (integer)
LINEJOIN constants

imagick::LINEJOIN_UNDEFINED (integer)
imagick::LINEJOIN_MITER (integer)
imagick::LINEJOIN_ROUND (integer)
imagick::LINEJOIN_BEVEL (integer)
RESOURCETYPE constants

imagick::RESOURCETYPE_UNDEFINED (integer)
imagick::RESOURCETYPE_AREA (integer)
Set the maximum width * height of an image that can reside in the pixel cache memory.
imagick::RESOURCETYPE_DISK (integer)
Set maximum amount of disk space in bytes permitted for use by the pixel cache.
imagick::RESOURCETYPE_FILE (integer)
Set maximum number of open pixel cache files.
imagick::RESOURCETYPE_MAP (integer)
Set maximum amount of memory map in bytes to allocate for the pixel cache.
imagick::RESOURCETYPE_MEMORY (integer)
Set maximum amount of memory in bytes to allocate for the pixel cache from the heap.
imagick::RESOURCETYPE_THREAD (integer)
Set maximum parallel threads. Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.7.8 or higher.
LAYERMETHOD constants

imagick::LAYERMETHOD_UNDEFINED (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.2.9 or higher.
imagick::LAYERMETHOD_COALESCE (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.2.9 or higher.
imagick::LAYERMETHOD_COMPAREANY (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.2.9 or higher.
imagick::LAYERMETHOD_COMPARECLEAR (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.2.9 or higher.
imagick::LAYERMETHOD_COMPAREOVERLAY (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.2.9 or higher.
imagick::LAYERMETHOD_DISPOSE (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.2.9 or higher.
imagick::LAYERMETHOD_OPTIMIZE (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.2.9 or higher.
imagick::LAYERMETHOD_OPTIMIZEPLUS (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.2.9 or higher.
imagick::LAYERMETHOD_OPTIMIZEIMAGE (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.0 or higher.
imagick::LAYERMETHOD_OPTIMIZETRANS (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.0 or higher.
imagick::LAYERMETHOD_REMOVEDUPS (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.0 or higher.
imagick::LAYERMETHOD_REMOVEZERO (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.0 or higher.
imagick::LAYERMETHOD_COMPOSITE (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.0 or higher.
imagick::LAYERMETHOD_MERGE (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.7 or higher.
imagick::LAYERMETHOD_FLATTEN (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.7 or higher.
imagick::LAYERMETHOD_MOSAIC (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.7 or higher.
ORIENTATION constants

imagick::ORIENTATION_UNDEFINED (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.0 or higher.
imagick::ORIENTATION_TOPLEFT (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.0 or higher.
imagick::ORIENTATION_TOPRIGHT (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.0 or higher.
imagick::ORIENTATION_BOTTOMRIGHT (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.0 or higher.
imagick::ORIENTATION_BOTTOMLEFT (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.0 or higher.
imagick::ORIENTATION_LEFTTOP (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.0 or higher.
imagick::ORIENTATION_RIGHTTOP (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.0 or higher.
imagick::ORIENTATION_RIGHTBOTTOM (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.0 or higher.
imagick::ORIENTATION_LEFTBOTTOM (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.0 or higher.
DISTORTION constants

imagick::DISTORTION_UNDEFINED (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.6 or higher.
imagick::DISTORTION_AFFINE (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.6 or higher.
imagick::DISTORTION_AFFINEPROJECTION (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.6 or higher.
imagick::DISTORTION_ARC (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.6 or higher.
imagick::DISTORTION_BILINEAR (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.6 or higher.
imagick::DISTORTION_PERSPECTIVE (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.6 or higher.
imagick::DISTORTION_PERSPECTIVEPROJECTION (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.6 or higher.
imagick::DISTORTION_SCALEROTATETRANSLATE (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.6 or higher.
imagick::DISTORTION_POLYNOMIAL (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.6 or higher.
imagick::DISTORTION_POLAR (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.6 or higher.
imagick::DISTORTION_DEPOLAR (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.6 or higher.
imagick::DISTORTION_BARREL (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.6 or higher.
imagick::DISTORTION_BARRELINVERSE (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.6 or higher.
imagick::DISTORTION_SHEPARDS (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.6 or higher.
imagick::DISTORTION_SENTINEL (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.6 or higher.
ALPHACHANNEL constants

imagick::ALPHACHANNEL_ACTIVATE (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.8 or higher.
imagick::ALPHACHANNEL_DEACTIVATE (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.8 or higher.
imagick::ALPHACHANNEL_RESET (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.8 or higher.
imagick::ALPHACHANNEL_SET (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.8 or higher.
imagick::ALPHACHANNEL_UNDEFINED (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.6 or higher.
imagick::ALPHACHANNEL_COPY (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.6 or higher.
imagick::ALPHACHANNEL_EXTRACT (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.6 or higher.
imagick::ALPHACHANNEL_OPAQUE (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.6 or higher.
imagick::ALPHACHANNEL_SHAPE (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.6 or higher.
imagick::ALPHACHANNEL_TRANSPARENT (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.6 or higher.
SPARSECOLORMETHOD constants

imagick::SPARSECOLORMETHOD_UNDEFINED (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.6 or higher.
imagick::SPARSECOLORMETHOD_BARYCENTRIC (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.6 or higher.
imagick::SPARSECOLORMETHOD_BILINEAR (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.6 or higher.
imagick::SPARSECOLORMETHOD_POLYNOMIAL (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.6 or higher.
imagick::SPARSECOLORMETHOD_SPEPARDS (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.6 or higher.
imagick::SPARSECOLORMETHOD_VORONOI (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.6 or higher.
FUNCTION constants

imagick::FUNCTION_UNDEFINED (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.9 or higher.
imagick::FUNCTION_POLYNOMIAL (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.9 or higher.
imagick::FUNCTION_SINUSOID (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.9 or higher.
INTERPOLATE constants

imagick::INTERPOLATE_UNDEFINED (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.2 or higher.
imagick::INTERPOLATE_AVERAGE (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.2 or higher.
imagick::INTERPOLATE_BICUBIC (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.2 or higher.
imagick::INTERPOLATE_BILINEAR (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.2 or higher.
imagick::INTERPOLATE_FILTER (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.2 or higher.
imagick::INTERPOLATE_INTEGER (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.2 or higher.
imagick::INTERPOLATE_MESH (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.2 or higher.
imagick::INTERPOLATE_NEARESTNEIGHBOR (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.2 or higher.
imagick::INTERPOLATE_SPLINE (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.4 or higher.
DITHERMETHOD constants

imagick::DITHERMETHOD_UNDEFINED (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.6 or higher.
imagick::DITHERMETHOD_NO (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.6 or higher.
imagick::DITHERMETHOD_RIEMERSMA (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.6 or higher.
imagick::DITHERMETHOD_FLOYDSTEINBERG (integer)
Questa costante è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.6 or higher.


Esempi

Indice dei contenuti


Basic usage

Imagick makes image manipulation in PHP extremely easy through an OO interface. Here is a quick example on how to make a thumbnail:

Example #1 Creating a thumbnail in Imagick

<?php

header
('Content-type: image/jpeg');

$image = new Imagick('image.jpg');

// If 0 is provided as a width or height parameter,
// aspect ratio is maintained
$image->thumbnailImage(1000);

echo 
$image;

?>

Using SPL and other OO features supported in Imagick, it can be simple to resize all files in a directory (useful for batch resizing large digital camera images to be web viewable). Here we use resize, as we might want to retain certain meta-data:

Example #2 Make a thumbnail of all JPG files in a directory

<?php

$images 
= new Imagick(glob('images/*.JPG'));

foreach(
$images as $image) {

    
// Providing 0 forces thumbnailImage to maintain aspect ratio
    
$image->thumbnailImage(1024,0);

}

$images->writeImages();

?>

This is an example of creating a reflection of an image. The reflection is created by flipping the image and overlaying a gradient on it. Then both, the original image and the reflection is overlayed on a canvas.

Example #3 Creating a reflection of an image

<?php
/* Read the image */
$im = new Imagick("test.png");

/* Thumbnail the image */
$im->thumbnailImage(200null);

/* Create a border for the image */
$im->borderImage(new ImagickPixel("white"), 55);

/* Clone the image and flip it */
$reflection $im->clone();
$reflection->flipImage();

/* Create gradient. It will be overlayed on the reflection */
$gradient = new Imagick();

/* Gradient needs to be large enough for the image and the borders */
$gradient->newPseudoImage($reflection->getImageWidth() + 10$reflection->getImageHeight() + 10"gradient:transparent-black");

/* Composite the gradient on the reflection */
$reflection->compositeImage($gradientimagick::COMPOSITE_OVER00);

/* Add some opacity. Requires ImageMagick 6.2.9 or later */
$reflection->setImageOpacity0.3 );

/* Create an empty canvas */
$canvas = new Imagick();

/* Canvas needs to be large enough to hold the both images */
$width $im->getImageWidth() + 40;
$height = ($im->getImageHeight() * 2) + 30;
$canvas->newImage($width$height, new ImagickPixel("black"));
$canvas->setImageFormat("png");

/* Composite the original image and the reflection on the canvas */
$canvas->compositeImage($imimagick::COMPOSITE_OVER2010);
$canvas->compositeImage($reflectionimagick::COMPOSITE_OVER20$im->getImageHeight() + 10);

/* Output the image*/
header("Content-Type: image/png");
echo 
$canvas;
?>

Il precedente esempio visualizzerà qualcosa simile a:

Output of example : Creating a reflection of an image

This example illustrates how to use fill patterns during drawing.

Example #4 Filling text with gradient

<?php

/* Create a new imagick object */
$im = new Imagick();

/* Create new image. This will be used as fill pattern */
$im->newPseudoImage(5050"gradient:red-black");

/* Create imagickdraw object */
$draw = new ImagickDraw();

/* Start a new pattern called "gradient" */
$draw->pushPattern('gradient'005050);

/* Composite the gradient on the pattern */
$draw->composite(Imagick::COMPOSITE_OVER005050$im);

/* Close the pattern */
$draw->popPattern();

/* Use the pattern called "gradient" as the fill */
$draw->setFillPatternURL('#gradient');

/* Set font size to 52 */
$draw->setFontSize(52);

/* Annotate some text */
$draw->annotation(2050"Hello World!");

/* Create a new canvas object and a white image */
$canvas = new Imagick();
$canvas->newImage(35070"white");

/* Draw the ImagickDraw on to the canvas */
$canvas->drawImage($draw);

/* 1px black border around the image */
$canvas->borderImage('black'11);

/* Set the format to PNG */
$canvas->setImageFormat('png');

/* Output the image */
header("Content-Type: image/png");
echo 
$canvas;
?>

Il precedente esempio visualizzerà qualcosa simile a:

Output of example : Filling text with gradient

Working with animated GIF images

Example #5 Read in GIF image and resize all frames

<?php

/* Create a new imagick object and read in GIF */
$im = new Imagick("example.gif");

/* Resize all frames */
foreach ($im as $frame) {
    
/* 50x50 frames */
    
$frame->thumbnailImage(5050);

    
/* Set the virtual canvas to correct size */
    
$frame->setImagePage(505000);
}

/* Notice writeImages instead of writeImage */
$im->writeImages("example_small.gif"true);
?>

Working with ellipse primitive and custom fonts

Example #6 Create a PHP logo

<?php
/* Set width and height in proportion of genuine PHP logo */
$width 400;
$height 210;

/* Create an Imagick object with transparent canvas */
$img = new Imagick();
$img->newImage($width$height, new ImagickPixel('transparent'));

/* New ImagickDraw instance for ellipse draw */
$draw = new ImagickDraw();
/* Set purple fill color for ellipse */
$draw->setFillColor('#777bb4');
/* Set ellipse dimensions */
$draw->ellipse($width 2$height 2$width 2$height 20360);
/* Draw ellipse onto the canvas */
$img->drawImage($draw);

/* Reset fill color from purple to black for text (note: we are reusing ImagickDraw object) */
$draw->setFillColor('black');
/* Set stroke border to white color */
$draw->setStrokeColor('white');
/* Set stroke border thickness */
$draw->setStrokeWidth(2);
/* Set font kerning (negative value means that letters are closer to each other) */
$draw->setTextKerning(-8);
/* Set font and font size used in PHP logo */
$draw->setFont('Handel Gothic.ttf');
$draw->setFontSize(150);
/* Center text horizontally and vertically */
$draw->setGravity(Imagick::GRAVITY_CENTER);

/* Add center "php" with Y offset of -10 to canvas (inside ellipse) */
$img->annotateImage($draw0, -100'php');
$img->setImageFormat('png');

/* Set appropriate header for PNG and output the image */
header('Content-Type: image/png');
echo 
$img;
?>

Il precedente esempio visualizzerà qualcosa simile a:

Output of example : Creating PHP logo with Imagick




The Imagick class

(PECL imagick 2.0.0)

Sommario dellla classe

Imagick implements Iterator {
bool adaptiveBlurImage ( float $radius , float $sigma [, int $channel = Imagick::CHANNEL_DEFAULT ] )
bool adaptiveResizeImage ( int $columns , int $rows [, bool $bestfit = false ] )
bool adaptiveSharpenImage ( float $radius , float $sigma [, int $channel = Imagick::CHANNEL_DEFAULT ] )
bool adaptiveThresholdImage ( int $width , int $height , int $offset )
bool addImage ( Imagick $source )
bool addNoiseImage ( int $noise_type [, int $channel = Imagick::CHANNEL_DEFAULT ] )
bool animateImages ( string $x_server )
bool annotateImage ( ImagickDraw $draw_settings , float $x , float $y , float $angle , string $text )
Imagick appendImages ( bool $stack = false )
Imagick averageImages ( void )
bool blackThresholdImage ( mixed $threshold )
bool blurImage ( float $radius , float $sigma [, int $channel ] )
bool borderImage ( mixed $bordercolor , int $width , int $height )
bool charcoalImage ( float $radius , float $sigma )
bool chopImage ( int $width , int $height , int $x , int $y )
bool clear ( void )
bool clipImage ( void )
bool clipPathImage ( string $pathname , bool $inside )
Imagick clone ( void )
bool clutImage ( Imagick $lookup_table [, float $channel = Imagick::CHANNEL_DEFAULT ] )
Imagick coalesceImages ( void )
bool colorFloodfillImage ( mixed $fill , float $fuzz , mixed $bordercolor , int $x , int $y )
bool colorizeImage ( mixed $colorize , mixed $opacity )
Imagick combineImages ( int $channelType )
bool commentImage ( string $comment )
array compareImageChannels ( Imagick $image , int $channelType , int $metricType )
Imagick compareImageLayers ( int $method )
array compareImages ( Imagick $compare , int $metric )
bool compositeImage ( Imagick $composite_object , int $composite , int $x , int $y [, int $channel = Imagick::CHANNEL_ALL ] )
__construct ( mixed $files )
bool contrastImage ( bool $sharpen )
bool contrastStretchImage ( float $black_point , float $white_point [, int $channel = Imagick::CHANNEL_ALL ] )
bool convolveImage ( array $kernel [, int $channel = Imagick::CHANNEL_ALL ] )
bool cropImage ( int $width , int $height , int $x , int $y )
bool cropThumbnailImage ( int $width , int $height )
Imagick current ( void )
bool cycleColormapImage ( int $displace )
bool decipherImage ( string $passphrase )
Imagick deconstructImages ( void )
bool deleteImageArtifact ( string $artifact )
public bool deskewImage ( float $threshold )
bool despeckleImage ( void )
bool destroy ( void )
bool displayImage ( string $servername )
bool displayImages ( string $servername )
bool distortImage ( int $method , array $arguments , bool $bestfit )
bool drawImage ( ImagickDraw $draw )
bool edgeImage ( float $radius )
bool embossImage ( float $radius , float $sigma )
bool encipherImage ( string $passphrase )
bool enhanceImage ( void )
bool equalizeImage ( void )
bool evaluateImage ( int $op , float $constant [, int $channel = Imagick::CHANNEL_ALL ] )
public array exportImagePixels ( int $x , int $y , int $width , int $height , string $map , int $STORAGE )
bool extentImage ( int $width , int $height , int $x , int $y )
Imagick flattenImages ( void )
bool flipImage ( void )
bool floodFillPaintImage ( mixed $fill , float $fuzz , mixed $target , int $x , int $y , bool $invert [, int $channel = Imagick::CHANNEL_DEFAULT ] )
bool flopImage ( void )
bool frameImage ( mixed $matte_color , int $width , int $height , int $inner_bevel , int $outer_bevel )
public bool functionImage ( int $function , array $arguments [, int $channel = Imagick::CHANNEL_DEFAULT ] )
Imagick fxImage ( string $expression [, int $channel = Imagick::CHANNEL_ALL ] )
bool gammaImage ( float $gamma [, int $channel = Imagick::CHANNEL_ALL ] )
bool gaussianBlurImage ( float $radius , float $sigma [, int $channel = Imagick::CHANNEL_ALL ] )
int getColorspace ( void )
int getCompression ( void )
int getCompressionQuality ( void )
string getCopyright ( void )
string getFilename ( void )
string getFont ( void )
string getFormat ( void )
int getGravity ( void )
string getHomeURL ( void )
Imagick getImage ( void )
int getImageAlphaChannel ( void )
string getImageArtifact ( string $artifact )
ImagickPixel getImageBackgroundColor ( void )
string getImageBlob ( void )
array getImageBluePrimary ( void )
ImagickPixel getImageBorderColor ( void )
int getImageChannelDepth ( int $channel )
float getImageChannelDistortion ( Imagick $reference , int $channel , int $metric )
float getImageChannelDistortions ( Imagick $reference , int $metric [, int $channel = Imagick::CHANNEL_DEFAULT ] )
array getImageChannelExtrema ( int $channel )
public array getImageChannelKurtosis ([ int $channel = Imagick::CHANNEL_DEFAULT ] )
array getImageChannelMean ( int $channel )
array getImageChannelRange ( int $channel )
Imagick getImageClipMask ( void )
ImagickPixel getImageColormapColor ( int $index )
int getImageColors ( void )
int getImageColorspace ( void )
int getImageCompose ( void )
int getImageCompression ( void )
int getImageDelay ( void )
int getImageDepth ( void )
int getImageDispose ( void )
float getImageDistortion ( MagickWand $reference , int $metric )
array getImageExtrema ( void )
string getImageFilename ( void )
string getImageFormat ( void )
float getImageGamma ( void )
array getImageGeometry ( void )
int getImageGravity ( void )
array getImageGreenPrimary ( void )
int getImageHeight ( void )
array getImageHistogram ( void )
int getImageIndex ( void )
int getImageIterations ( void )
int getImageLength ( void )
string getImageMagickLicense ( void )
bool getImageMatte ( void )
ImagickPixel getImageMatteColor ( void )
int getImageOrientation ( void )
array getImagePage ( void )
ImagickPixel getImagePixelColor ( int $x , int $y )
string getImageProfile ( string $name )
array getImageProfiles ([ string $pattern = "*" [, bool $only_names = true ]] )
array getImageProperties ([ string $pattern = "*" [, bool $only_names = true ]] )
string getImageProperty ( string $name )
array getImageRedPrimary ( void )
Imagick getImageRegion ( int $width , int $height , int $x , int $y )
array getImageResolution ( void )
string getImagesBlob ( void )
int getImageScene ( void )
string getImageSignature ( void )
int getImageSize ( void )
float getImageTotalInkDensity ( void )
int getImageType ( void )
int getImageUnits ( void )
array getImageWhitePoint ( void )
int getImageWidth ( void )
int getInterlaceScheme ( void )
int getIteratorIndex ( void )
int getNumberImages ( void )
string getOption ( string $key )
string getPackageName ( void )
array getPage ( void )
ImagickPixelIterator getPixelIterator ( void )
ImagickPixelIterator getPixelRegionIterator ( int $x , int $y , int $columns , int $rows )
float getPointSize ( void )
array getQuantumDepth ( void )
array getQuantumRange ( void )
string getReleaseDate ( void )
int getResource ( int $type )
int getResourceLimit ( int $type )
array getSamplingFactors ( void )
array getSize ( void )
int getSizeOffset ( void )
array getVersion ( void )
public bool haldClutImage ( Imagick $clut [, int $channel = Imagick::CHANNEL_DEFAULT ] )
bool hasNextImage ( void )
bool hasPreviousImage ( void )
array identifyImage ([ bool $appendRawOutput = false ] )
bool implodeImage ( float $radius )
public bool importImagePixels ( int $x , int $y , int $width , int $height , string $map , int $storage , array $pixels )
bool labelImage ( string $label )
bool levelImage ( float $blackPoint , float $gamma , float $whitePoint [, int $channel = Imagick::CHANNEL_ALL ] )
bool linearStretchImage ( float $blackPoint , float $whitePoint )
bool liquidRescaleImage ( int $width , int $height , float $delta_x , float $rigidity )
bool magnifyImage ( void )
bool mapImage ( Imagick $map , bool $dither )
bool matteFloodfillImage ( float $alpha , float $fuzz , mixed $bordercolor , int $x , int $y )
bool medianFilterImage ( float $radius )
bool mergeImageLayers ( int $layer_method )
bool minifyImage ( void )
bool modulateImage ( float $brightness , float $saturation , float $hue )
Imagick montageImage ( ImagickDraw $draw , string $tile_geometry , string $thumbnail_geometry , int $mode , string $frame )
Imagick morphImages ( int $number_frames )
Imagick mosaicImages ( void )
bool motionBlurImage ( float $radius , float $sigma , float $angle [, int $channel = Imagick::CHANNEL_DEFAULT ] )
bool negateImage ( bool $gray [, int $channel = Imagick::CHANNEL_ALL ] )
bool newImage ( int $cols , int $rows , mixed $background [, string $format ] )
bool newPseudoImage ( int $columns , int $rows , string $pseudoString )
bool nextImage ( void )
bool normalizeImage ([ int $channel = Imagick::CHANNEL_ALL ] )
bool oilPaintImage ( float $radius )
bool opaquePaintImage ( mixed $target , mixed $fill , float $fuzz , bool $invert [, int $channel = Imagick::CHANNEL_DEFAULT ] )
bool optimizeImageLayers ( void )
bool orderedPosterizeImage ( string $threshold_map [, int $channel = Imagick::CHANNEL_ALL ] )
bool paintFloodfillImage ( mixed $fill , float $fuzz , mixed $bordercolor , int $x , int $y [, int $channel = Imagick::CHANNEL_ALL ] )
bool paintOpaqueImage ( mixed $target , mixed $fill , float $fuzz [, int $channel = Imagick::CHANNEL_ALL ] )
bool paintTransparentImage ( mixed $target , float $alpha , float $fuzz )
bool pingImage ( string $filename )
bool pingImageBlob ( string $image )
bool pingImageFile ( resource $filehandle [, string $fileName ] )
bool polaroidImage ( ImagickDraw $properties , float $angle )
bool posterizeImage ( int $levels , bool $dither )
bool previewImages ( int $preview )
bool previousImage ( void )
bool profileImage ( string $name , string $profile )
bool quantizeImage ( int $numberColors , int $colorspace , int $treedepth , bool $dither , bool $measureError )
bool quantizeImages ( int $numberColors , int $colorspace , int $treedepth , bool $dither , bool $measureError )
array queryFontMetrics ( ImagickDraw $properties , string $text [, bool $multiline ] )
array queryFonts ([ string $pattern = "*" ] )
array queryFormats ([ string $pattern = "*" ] )
bool radialBlurImage ( float $angle [, int $channel = Imagick::CHANNEL_ALL ] )
bool raiseImage ( int $width , int $height , int $x , int $y , bool $raise )
bool randomThresholdImage ( float $low , float $high [, int $channel = Imagick::CHANNEL_ALL ] )
bool readImage ( string $filename )
bool readImageBlob ( string $image [, string $filename ] )
bool readImageFile ( resource $filehandle [, string $fileName = null ] )
bool recolorImage ( array $matrix )
bool reduceNoiseImage ( float $radius )
public bool remapImage ( Imagick $replacement , int $DITHER )
bool removeImage ( void )
string removeImageProfile ( string $name )
bool render ( void )
bool resampleImage ( float $x_resolution , float $y_resolution , int $filter , float $blur )
bool resetImagePage ( string $page )
bool resizeImage ( int $columns , int $rows , int $filter , float $blur [, bool $bestfit = false ] )
bool rollImage ( int $x , int $y )
bool rotateImage ( mixed $background , float $degrees )
bool roundCorners ( float $x_rounding , float $y_rounding [, float $stroke_width = 10 [, float $displace = 5 [, float $size_correction = -6 ]]] )
bool sampleImage ( int $columns , int $rows )
bool scaleImage ( int $cols , int $rows [, bool $bestfit = false ] )
public bool segmentImage ( int $COLORSPACE , float $cluster_threshold , float $smooth_threshold [, bool $verbose = false ] )
bool separateImageChannel ( int $channel )
bool sepiaToneImage ( float $threshold )
bool setBackgroundColor ( mixed $background )
bool setColorspace ( int $COLORSPACE )
bool setCompression ( int $compression )
bool setCompressionQuality ( int $quality )
bool setFilename ( string $filename )
bool setFirstIterator ( void )
bool setFont ( string $font )
bool setFormat ( string $format )
bool setGravity ( int $gravity )
bool setImage ( Imagick $replace )
bool setImageAlphaChannel ( int $mode )
bool setImageArtifact ( string $artifact , string $value )
bool setImageBackgroundColor ( mixed $background )
bool setImageBias ( float $bias )
bool setImageBluePrimary ( float $x , float $y )
bool setImageBorderColor ( mixed $border )
bool setImageChannelDepth ( int $channel , int $depth )
bool setImageClipMask ( Imagick $clip_mask )
bool setImageColormapColor ( int $index , ImagickPixel $color )
bool setImageColorspace ( int $colorspace )
bool setImageCompose ( int $compose )
bool setImageCompression ( int $compression )
bool setImageCompressionQuality ( int $quality )
bool setImageDelay ( int $delay )
bool setImageDepth ( int $depth )
bool setImageDispose ( int $dispose )
bool setImageExtent ( int $columns , int $rows )
bool setImageFilename ( string $filename )
bool setImageFormat ( string $format )
bool setImageGamma ( float $gamma )
bool setImageGravity ( int $gravity )
bool setImageGreenPrimary ( float $x , float $y )
bool setImageIndex ( int $index )
bool setImageInterlaceScheme ( int $interlace_scheme )
bool setImageInterpolateMethod ( int $method )
bool setImageIterations ( int $iterations )
bool setImageMatte ( bool $matte )
bool setImageMatteColor ( mixed $matte )
bool setImageOpacity ( float $opacity )
bool setImageOrientation ( int $orientation )
bool setImagePage ( int $width , int $height , int $x , int $y )
bool setImageProfile ( string $name , string $profile )
bool setImageProperty ( string $name , string $value )
bool setImageRedPrimary ( float $x , float $y )
bool setImageRenderingIntent ( int $rendering_intent )
bool setImageResolution ( float $x_resolution , float $y_resolution )
bool setImageScene ( int $scene )
bool setImageTicksPerSecond ( int $ticks_per_second )
bool setImageType ( int $image_type )
bool setImageUnits ( int $units )
bool setImageVirtualPixelMethod ( int $method )
bool setImageWhitePoint ( float $x , float $y )
bool setInterlaceScheme ( int $interlace_scheme )
bool setIteratorIndex ( int $index )
bool setLastIterator ( void )
bool setOption ( string $key , string $value )
bool setPage ( int $width , int $height , int $x , int $y )
bool setPointSize ( float $point_size )
bool setResolution ( float $x_resolution , float $y_resolution )
bool setResourceLimit ( int $type , int $limit )
bool setSamplingFactors ( array $factors )
bool setSize ( int $columns , int $rows )
bool setSizeOffset ( int $columns , int $rows , int $offset )
bool setType ( int $image_type )
bool shadeImage ( bool $gray , float $azimuth , float $elevation )
bool shadowImage ( float $opacity , float $sigma , int $x , int $y )
bool sharpenImage ( float $radius , float $sigma [, int $channel = Imagick::CHANNEL_ALL ] )
bool shaveImage ( int $columns , int $rows )
bool shearImage ( mixed $background , float $x_shear , float $y_shear )
bool sigmoidalContrastImage ( bool $sharpen , float $alpha , float $beta [, int $channel = Imagick::CHANNEL_ALL ] )
bool sketchImage ( float $radius , float $sigma , float $angle )
bool solarizeImage ( int $threshold )
public bool sparseColorImage ( int $SPARSE_METHOD , array $arguments [, int $channel = Imagick::CHANNEL_DEFAULT ] )
bool spliceImage ( int $width , int $height , int $x , int $y )
bool spreadImage ( float $radius )
Imagick steganoImage ( Imagick $watermark_wand , int $offset )
bool stereoImage ( Imagick $offset_wand )
bool stripImage ( void )
bool swirlImage ( float $degrees )
bool textureImage ( Imagick $texture_wand )
bool thresholdImage ( float $threshold [, int $channel = Imagick::CHANNEL_ALL ] )
bool thumbnailImage ( int $columns , int $rows [, bool $bestfit = false [, bool $fill = false ]] )
bool tintImage ( mixed $tint , mixed $opacity )
Imagick transformImage ( string $crop , string $geometry )
bool transparentPaintImage ( mixed $target , float $alpha , float $fuzz , bool $invert )
bool transposeImage ( void )
bool transverseImage ( void )
bool trimImage ( float $fuzz )
bool uniqueImageColors ( void )
bool unsharpMaskImage ( float $radius , float $sigma , float $amount , float $threshold [, int $channel = Imagick::CHANNEL_ALL ] )
bool valid ( void )
bool vignetteImage ( float $blackPoint , float $whitePoint , int $x , int $y )
bool waveImage ( float $amplitude , float $length )
bool whiteThresholdImage ( mixed $threshold )
bool writeImage ([ string $filename = NULL ] )
bool writeImageFile ( resource $filehandle )
bool writeImages ( string $filename , bool $adjoin )
bool writeImagesFile ( resource $filehandle )
}

Image methods and global methods

The Imagick class has the ability to hold and operate on multiple images simultaneously. This is achieved through an internal stack. There is always an internal pointer that points at the current image. Some functions operate on all images in the Imagick class, but most operate only on the current image in the internal stack. As a convention, method names can contain the word Image to denote they affect only the current image in the stack.

Class Methods

Because there are so many methods, here is a handy list of methods, somewhat reduced to their general purpose:

Class methods by purpose
Image effects Get methods Set methods Read/write images Other
Imagick::adaptiveBlurImage() Imagick::getCompression() Imagick::setBackgroundColor() Imagick::__construct() Imagick::clear()
Imagick::adaptiveResizeImage() Imagick::getFilename() Imagick::setCompressionQuality() Imagick::addImage() Imagick::clone()
Imagick::adaptiveSharpenImage() Imagick::getFormat() Imagick::setCompression() Imagick::appendImages() Imagick::current()
Imagick::adaptiveThresholdImage() Imagick::getImageBackgroundColor() Imagick::setFilename() Imagick::getFilename() Imagick::destroy()
Imagick::addNoiseImage() Imagick::getImageBlob() Imagick::getImagesBlob() Imagick::setFormat() Imagick::getFormat()
Imagick::affinetransformimage() Imagick::getImageBluePrimary() Imagick::setImageBackgroundColor() Imagick::getImageFilename() Imagick::getHomeURL()
Imagick::annotateImage() Imagick::getImageBorderColor() Imagick::setFirstIterator() Imagick::getImageFormat() Imagick::commentImage()
Imagick::averageImages() Imagick::getImageChannelDepth() Imagick::setImageBias() Imagick::getImage() Imagick::getNumberImages()
Imagick::blackThresholdImage() Imagick::getImageChannelDistortion() Imagick::setImageBluePrimary() Imagick::setImageFilename() Imagick::getReleaseDate()
Imagick::blurImage() Imagick::getImageChannelExtrema() Imagick::setImageBorderColor() Imagick::setImageFormat() Imagick::getVersion()
Imagick::borderImage() Imagick::getImageChannelMean() Imagick::setImageChannelDepth() Imagick::readImageFile() Imagick::hasNextImage()
Imagick::charcoalImage() Imagick::getImageChannelStatistics() Imagick::setImageColormapColor() Imagick::readImage() Imagick::hasPreviousImage()
Imagick::chopImage() Imagick::getImageColormapColor() Imagick::setImageColorSpace() Imagick::writeImages() Imagick::labelImage()
Imagick::clipImage() Imagick::getImageColorspace() Imagick::setImageCompose() Imagick::writeImage() Imagick::newImage()
Imagick::clipPathImage() Imagick::getImageColors() Imagick::setImageCompression()   Imagick::newPseudoImage()
Imagick::coalesceImages() Imagick::getImageCompose() Imagick::setImageDelay()   Imagick::nextImage()
Imagick::colorFloodFillImage() Imagick::getImageDelay() Imagick::setImageDepth()   Imagick::pingImageBlob()
Imagick::colorizeImage() Imagick::getImageDepth() Imagick::setImageDispose()   Imagick::pingImageFile()
Imagick::combineImages() Imagick::getImageDispose() Imagick::setImageDispose()   Imagick::pingImage()
Imagick::compareImageChannels() Imagick::getImageDistortion() Imagick::setImageExtent()   Imagick::previousImage()
Imagick::compareImageLayers() Imagick::getImageExtrema() Imagick::setImageFilename()   Imagick::profileImage()
Imagick::compositeImage() Imagick::getImageFilename() Imagick::setImageFormat()   Imagick::queryFormats()
Imagick::contrastImage() Imagick::getImageFormat() Imagick::setImageGamma()   Imagick::removeImageProfile()
Imagick::contrastStretchImage() Imagick::getImageGamma() Imagick::setImageGreenPrimary()   Imagick::removeImage()
Imagick::convolveImage() Imagick::getImageGeometry() Imagick::setImageIndex()   Imagick::setFirstIterator()
Imagick::cropImage() Imagick::getImageGreenPrimary() Imagick::setImageInterpolateMethod()   Imagick::setImageIndex()
Imagick::cycleColormapImage() Imagick::getImageHeight() Imagick::setImageIterations()   Imagick::valid()
Imagick::deconstructImages() Imagick::getImageHistogram() Imagick::setImageMatteColor()   Imagick::getCopyright()
Imagick::drawImage() Imagick::getImageIndex() Imagick::setImageMatte()    
Imagick::edgeImage() Imagick::getImageInterlaceScheme() Imagick::setImagePage()    
Imagick::embossImage() Imagick::getImageInterpolateMethod() Imagick::setImageProfile()    
Imagick::enhanceImage() Imagick::getImageIterations() Imagick::setImageProperty()    
Imagick::equalizeImage() Imagick::getImageMatteColor() Imagick::setImageRedPrimary()    
Imagick::evaluateImage() Imagick::getImageMatte() Imagick::setImageRenderingIntent()    
Imagick::flattenImages() Imagick::getImagePage() Imagick::setImageResolution()    
Imagick::flipImage() Imagick::getImagePixelColor() Imagick::setImageScene()    
Imagick::flopImage() Imagick::getImageProfile() Imagick::setImageTicksPerSecond()    
  Imagick::getImageProperty() Imagick::setImageType()    
Imagick::fxImage() Imagick::getImageRedPrimary() Imagick::setImageUnits()    
Imagick::gammaImage() Imagick::getImageRegion() Imagick::setImageVirtualPixelMethod()    
Imagick::gaussianBlurImage() Imagick::getImageRenderingIntent() Imagick::setImageWhitepoint()    
Imagick::implodeImage() Imagick::getImageResolution() Imagick::setInterlaceScheme()    
Imagick::levelImage() Imagick::getImageScene() Imagick::setOption()    
Imagick::linearStretchImage() Imagick::getImageSignature() Imagick::setPage()    
Imagick::magnifyImage() Imagick::getImageTicksPerSecond() Imagick::setResolution()    
Imagick::matteFloodFillImage() Imagick::getImageTotalInkDensity() Imagick::setResourceLimit()    
Imagick::medianFilterImage() Imagick::getImageType() Imagick::setSamplingFactors()    
Imagick::minifyImage() Imagick::getImageUnits() Imagick::setSizeOffset()    
Imagick::modulateImage() Imagick::getImageVirtualPixelMethod() Imagick::setSize()    
Imagick::montageImage() Imagick::getImageWhitepoint() Imagick::setType()    
Imagick::morphImages() Imagick::getImageWidth()      
Imagick::mosaicImages() Imagick::getImage()      
Imagick::motionBlurImage() Imagick::getInterlaceScheme()      
Imagick::negateImage() Imagick::getNumberImages()      
Imagick::normalizeImage() Imagick::getOption()      
Imagick::oilPaintImage() Imagick::getPackageName()      
Imagick::optimizeImageLayers() Imagick::getPage()      
Imagick::paintOpaqueImage() Imagick::getPixelIterator()      
Imagick::paintTransparentImage() Imagick::getPixelRegionIterator()      
Imagick::posterizeImage() Imagick::getQuantumDepth()      
Imagick::radialBlurImage() Imagick::getQuantumRange()      
Imagick::raiseImage() Imagick::getResourceLimit()      
Imagick::randomThresholdImage() Imagick::getResource()      
Imagick::reduceNoiseImage() Imagick::getSamplingFactors()      
Imagick::render() Imagick::getSizeOffset()      
Imagick::resampleImage() Imagick::getSize()      
Imagick::resizeImage() Imagick::identifyImage()      
Imagick::rollImage() Imagick::getImageSize()      
Imagick::rotateImage()        
Imagick::sampleImage()        
Imagick::scaleImage()        
Imagick::separateImageChannel()        
Imagick::sepiaToneImage()        
Imagick::shadeImage()        
Imagick::shadowImage()        
Imagick::sharpenImage()        
Imagick::shaveImage()        
Imagick::shearImage()        
Imagick::sigmoidalContrastImage()        
Imagick::sketchImage()        
Imagick::solarizeImage()        
Imagick::spliceImage()        
Imagick::spreadImage()        
Imagick::steganoImage()        
Imagick::stereoImage()        
Imagick::stripImage()        
Imagick::swirlImage()        
Imagick::textureImage()        
Imagick::thresholdImage()        
Imagick::thumbnailImage()        
Imagick::tintImage()        
Imagick::transverseImage()        
Imagick::trimImage()        
Imagick::uniqueImageColors()        
Imagick::unsharpMaskImage()        
Imagick::vignetteImage()        
Imagick::waveImage()        
Imagick::whiteThresholdImage()        

Imagick::adaptiveBlurImage

(PECL imagick 2.0.0)

Imagick::adaptiveBlurImageAdds adaptive blur filter to image

Descrizione

bool Imagick::adaptiveBlurImage ( float $radius , float $sigma [, int $channel = Imagick::CHANNEL_DEFAULT ] )

Adds an adaptive blur filter to image. The intensity of an adaptive blur depends is dramatically decreased at edge of the image, whereas a standard blur is uniform across the image. Questo metodo è disponibile se Imagick è stato compilato con ImageMagick versione 6.2.9 o successive.

Elenco dei parametri

radius

The radius of the Gaussian, in pixels, not counting the center pixel. Provide a value of 0 and the radius will be chosen automagically.

sigma

The standard deviation of the Gaussian, in pixels.

channel

Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Per default è Imagick::CHANNEL_DEFAULT. Fare riferimento a questa lista di costanti di canale

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.

Esempi

Example #1 Using Imagick::adaptiveBlurImage():

Adaptively blur an image, then display to the browser.

<?php

header
('Content-type: image/jpeg');

$image = new Imagick('test.jpg');

$image->adaptiveBlurImage(5,3);
echo 
$image;

?>

Il precedente esempio visualizzerà qualcosa simile a:

Output of example : Using Imagick::adaptiveBlurImage()

Vedere anche:



Imagick::adaptiveResizeImage

(PECL imagick 2.0.0)

Imagick::adaptiveResizeImageAdaptively resize image with data dependent triangulation

Descrizione

bool Imagick::adaptiveResizeImage ( int $columns , int $rows [, bool $bestfit = false ] )

Adaptively resize image with data-dependent triangulation. Avoids blurring across sharp color changes. Most useful when used to shrink images slightly to a slightly smaller "web size"; may not look good when a full-sized image is adaptively resized to a thumbnail. Questo metodo è disponibile se Imagick è stato compilato con ImageMagick versione 6.2.9 o successive.

Nota: The behavior of the parameter bestfit changed in Imagick 3.0.0. Before this version given dimensions 400x400 an image of dimensions 200x150 would be left untouched. In Imagick 3.0.0 and later the image would be scaled up to size 400x300 as this is the "best fit" for the given dimensions. If bestfit parameter is used both width and height must be given.

Elenco dei parametri

columns

The number of columns in the scaled image.

rows

The number of rows in the scaled image.

bestfit

Whether to fit the image inside a bounding box.

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.

Log delle modifiche

Versione Descrizione
2.1.0 Added optional fit parameter.
2.1.0 This method now supports proportional scaling. Pass zero as either parameter for proportional scaling.

Esempi

Example #1 Using Imagick::adaptiveResizeImage()

Resize an image to a standard size for the web. This method works best when resizing to a size only slightly smaller than the previous image size.

<?php
header
('Content-type: image/jpeg');

$image = new Imagick('image.jpg');
$image->adaptiveResizeImage(1024,768);

echo 
$image;
?>

Vedere anche:



Imagick::adaptiveSharpenImage

(PECL imagick 2.0.0)

Imagick::adaptiveSharpenImageAdaptively sharpen the image

Descrizione

bool Imagick::adaptiveSharpenImage ( float $radius , float $sigma [, int $channel = Imagick::CHANNEL_DEFAULT ] )

Adaptively sharpen the image by sharpening more intensely near image edges and less intensely far from edges. Questo metodo è disponibile se Imagick è stato compilato con ImageMagick versione 6.2.9 o successive.

Elenco dei parametri

radius

The radius of the Gaussian, in pixels, not counting the center pixel. Use 0 for auto-select.

sigma

The standard deviation of the Gaussian, in pixels.

channel

Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Per default è Imagick::CHANNEL_DEFAULT. Fare riferimento a questa lista di costanti di canale

Valori restituiti

Restituisce TRUE in caso di successo.

Esempi

Example #1 A Imagick::adaptiveSharpenImage() example

Adaptively sharpen the image with radius 2 and sigma 1.

<?php
try {
    
$image = new Imagick('image.png');
    
$image->adaptiveSharpenImage(2,1);
} catch(
ImagickException $e) {
    echo 
'Error: ' $e->getMessage();
    die();
}
header('Content-type: image/png');
echo 
$image;
?>

Vedere anche:



Imagick::adaptiveThresholdImage

(PECL imagick 2.0.0)

Imagick::adaptiveThresholdImageSelects a threshold for each pixel based on a range of intensity

Descrizione

bool Imagick::adaptiveThresholdImage ( int $width , int $height , int $offset )

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.

Elenco dei parametri

width

Width of the local neighborhood.

height

Height of the local neighborhood.

offset

The mean offset

Valori restituiti

Restituisce TRUE in caso di successo.



Imagick::addImage

(PECL imagick 2.0.0)

Imagick::addImageAdds new image to Imagick object image list

Descrizione

bool Imagick::addImage ( Imagick $source )

Adds new image to Imagick object from the current position of the source object. After the operation iterator position is moved at the end of the list.

Elenco dei parametri

source

The source Imagick object

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::addNoiseImage

(PECL imagick 2.0.0)

Imagick::addNoiseImageAdds random noise to the image

Descrizione

bool Imagick::addNoiseImage ( int $noise_type [, int $channel = Imagick::CHANNEL_DEFAULT ] )

Adds random noise to the image.

Elenco dei parametri

noise_type

The type of the noise. Refer to this list of noise constants.

channel

Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Per default è Imagick::CHANNEL_DEFAULT. Fare riferimento a questa lista di costanti di canale

Valori restituiti

Restituisce TRUE in caso di successo.



Imagick::affineTransformImage

(PECL imagick 2.0.0)

Imagick::affineTransformImageTransforms an image

Descrizione

bool Imagick::affineTransformImage ( ImagickDraw $matrix )

Transforms an image as dictated by the affine matrix.

Elenco dei parametri

matrix

The affine matrix

Valori restituiti

Restituisce TRUE in caso di successo.



Imagick::animateImages

(No version information available, might only be in Git)

Imagick::animateImagesAnimates an image or images

Descrizione

bool Imagick::animateImages ( string $x_server )

This method animates the image onto a local or remote X server. This method is not available on Windows. Questo metodo è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.6 o successive.

Elenco dei parametri

x_server

X server address

Valori restituiti

Restituisce TRUE in caso di successo.

Vedere anche:



Imagick::annotateImage

(PECL imagick 2.0.0)

Imagick::annotateImageAnnotates an image with text

Descrizione

bool Imagick::annotateImage ( ImagickDraw $draw_settings , float $x , float $y , float $angle , string $text )

Annotates an image with text.

Elenco dei parametri

draw_settings

The ImagickDraw object that contains settings for drawing the text

x

Horizontal offset in pixels to the left of text

y

Vertical offset in pixels to the baseline of text

angle

The angle at which to write the text

text

The string to draw

Valori restituiti

Restituisce TRUE in caso di successo.

Esempi

Example #1 Using Imagick::annotateImage():

Annotate text on an empty image

<?php
/* Create some objects */
$image = new Imagick();
$draw = new ImagickDraw();
$pixel = new ImagickPixel'gray' );

/* New image */
$image->newImage(80075$pixel);

/* Black text */
$draw->setFillColor('black');

/* Font properties */
$draw->setFont('Bookman-DemiItalic');
$draw->setFontSize30 );

/* Create text */
$image->annotateImage($draw10450'The quick brown fox jumps over the lazy dog');

/* Give image a format */
$image->setImageFormat('png');

/* Output the image with headers */
header('Content-type: image/png');
echo 
$image;

?>

Vedere anche:



Imagick::appendImages

(PECL imagick 2.0.0)

Imagick::appendImagesAppend a set of images

Descrizione

Imagick Imagick::appendImages ( bool $stack = false )

Append a set of images into one larger image.

Elenco dei parametri

stack

Whether to stack the images vertically. By default (or if FALSE is specified) images are stacked left-to-right. If stack is TRUE, images are stacked top-to-bottom.

Valori restituiti

Returns Imagick instance on success.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.

Esempi

Example #1 Imagick::appendImages() example

<?php

/* Create new imagick object */
$im = new Imagick();

/* create red, green and blue images */
$im->newImage(10050"red");
$im->newImage(10050"green");
$im->newImage(10050"blue");

/* Append the images into one */
$im->resetIterator();
$combined $im->appendImages(true);

/* Output the image */
$combined->setImageFormat("png");
header("Content-Type: image/png");
echo 
$combined;
?>

Il precedente esempio visualizzerà qualcosa simile a:

Output of example : Imagick::appendImages()



Imagick::averageImages

(PECL imagick 2.0.0)

Imagick::averageImagesAverage a set of images

Descrizione

Imagick Imagick::averageImages ( void )

Average a set of images.

Valori restituiti

Returns a new Imagick object on success.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::blackThresholdImage

(PECL imagick 2.0.0)

Imagick::blackThresholdImageForces all pixels below the threshold into black

Descrizione

bool Imagick::blackThresholdImage ( mixed $threshold )

Is like Imagick::thresholdImage() but forces all pixels below the threshold into black while leaving all pixels above the threshold unchanged.

Elenco dei parametri

threshold

The threshold below which everything turns black

Valori restituiti

Restituisce TRUE in caso di successo.

Log delle modifiche

Versione Descrizione
2.1.0 Now allows a string representing the color as a parameter. Previous versions allow only an ImagickPixel object.



Imagick::blurImage

(PECL imagick 2.0.0)

Imagick::blurImageAdds blur filter to image

Descrizione

bool Imagick::blurImage ( float $radius , float $sigma [, int $channel ] )

Adds blur filter to image. Optional third parameter to blur a specific channel.

Elenco dei parametri

radius

Blur radius

sigma

Standard deviation

channel

The Channeltype constant. When not supplied, all channels are blurred.

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.

Esempi

Example #1 Using Imagick::blurImage():

Blur an image, then display to the browser.

<?php

header
('Content-type: image/jpeg');

$image = new Imagick('test.jpg');

$image->blurImage(5,3);
echo 
$image;

?>

Vedere anche:



Imagick::borderImage

(PECL imagick 2.0.0)

Imagick::borderImageSurrounds the image with a border

Descrizione

bool Imagick::borderImage ( mixed $bordercolor , int $width , int $height )

Surrounds the image with a border of the color defined by the bordercolor ImagickPixel object.

Elenco dei parametri

bordercolor

ImagickPixel object or a string containing the border color

width

Border width

height

Border height

Valori restituiti

Restituisce TRUE in caso di successo.

Log delle modifiche

Versione Descrizione
2.1.0 Now allows a string representing the color as the first parameter. Previous versions allow only an ImagickPixel object.



Imagick::charcoalImage

(PECL imagick 2.0.0)

Imagick::charcoalImageSimulates a charcoal drawing

Descrizione

bool Imagick::charcoalImage ( float $radius , float $sigma )

Simulates a charcoal drawing.

Elenco dei parametri

radius

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

sigma

The standard deviation of the Gaussian, in pixels

Valori restituiti

Restituisce TRUE in caso di successo.



Imagick::chopImage

(PECL imagick 2.0.0)

Imagick::chopImageRemoves a region of an image and trims

Descrizione

bool Imagick::chopImage ( int $width , int $height , int $x , int $y )

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

Elenco dei parametri

width

Width of the chopped area

height

Height of the chopped area

x

X origo of the chopped area

y

Y origo of the chopped area

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.

Esempi

Example #1 Using Imagick::chopImage():

Example of using Imagick::chopImage

<?php
/* Create some objects */
$image = new Imagick();
$pixel = new ImagickPixel'gray' );

/* New image */
$image->newImage(400200$pixel);

/* Chop image */
$image->chopImage(20020000);

/* Give image a format */
$image->setImageFormat('png');

/* Output the image with headers */
header('Content-type: image/png');
echo 
$image;

?>

Vedere anche:



Imagick::clear

(PECL imagick 2.0.0)

Imagick::clearClears all resources associated to Imagick object

Descrizione

bool Imagick::clear ( void )

Clears all resources associated to Imagick object

Valori restituiti

Restituisce TRUE in caso di successo.



Imagick::clipImage

(PECL imagick 2.0.0)

Imagick::clipImageClips along the first path from the 8BIM profile

Descrizione

bool Imagick::clipImage ( void )

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

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::clipPathImage

(PECL imagick 2.0.0)

Imagick::clipPathImageClips along the named paths from the 8BIM profile

Descrizione

bool Imagick::clipPathImage ( string $pathname , bool $inside )

Clips along the named paths from the 8BIM profile, if present. Later operations take effect inside the path. It may be a number if preceded with #, to work on a numbered path, e.g., "#1" to use the first path.

Elenco dei parametri

pathname

The name of the path

inside

If TRUE later operations take effect inside clipping path. Otherwise later operations take effect outside clipping path.

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::clone

(PECL imagick 2.0.0)

Imagick::cloneMakes an exact copy of the Imagick object

Descrizione

Imagick Imagick::clone ( void )

Makes an exact copy of the Imagick object.

Avviso

This function has been DEPRECATED as of imagick 3.1.0 in favour of using the clone keyword.

Esempi

Example #1 Imagick object cloning in different versions of imagick

<?php
// Cloning an Imagick object in imagick 2.x and 3.0:
$newImage $image->clone();

// Cloning an Imagick object from 3.1.0 on:
$newImage = clone $image;
?>

Valori restituiti

A copy of the Imagick object is returned.

Log delle modifiche

Versione Descrizione
3.1.0 The method was deprecated in favour of the clone keyword.



Imagick::clutImage

(PECL imagick 2.0.0)

Imagick::clutImageReplaces colors in the image

Descrizione

bool Imagick::clutImage ( Imagick $lookup_table [, float $channel = Imagick::CHANNEL_DEFAULT ] )

Replaces colors in the image from a color lookup table. Optional second parameter to replace colors in a specific channel. Questo metodo è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.6 o successive.

Elenco dei parametri

lookup_table

Imagick object containing the color lookup table

channel

The Channeltype constant. When not supplied, default channels are replaced.

Valori restituiti

Restituisce TRUE in caso di successo.

Esempi

Example #1 Using Imagick::clutImage():

Replace colors in the image from a color lookup table.

<?php
$image 
= new Imagick('test.jpg');
$clut = new Imagick();
$clut->newImage(11, new ImagickPixel('black'));
$image->clutImage($clut);
$image->writeImage('test_out.jpg');
?>

Vedere anche:



Imagick::coalesceImages

(PECL imagick 2.0.0)

Imagick::coalesceImagesComposites a set of images

Descrizione

Imagick Imagick::coalesceImages ( void )

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. Returns a new Imagick object where each image in the sequence is the same size as the first and composited with the next image in the sequence.

Valori restituiti

Returns a new Imagick object on success.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::colorFloodfillImage

(PECL imagick 2.0.0)

Imagick::colorFloodfillImageChanges the color value of any pixel that matches target

Descrizione

bool Imagick::colorFloodfillImage ( mixed $fill , float $fuzz , mixed $bordercolor , int $x , int $y )

Changes the color value of any pixel that matches target and is an immediate neighbor.

Elenco dei parametri

fill

ImagickPixel object containing the fill color

fuzz

The amount of fuzz. 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

ImagickPixel object containing the border color

x

X start position of the floodfill

y

Y start position of the floodfill

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.

Log delle modifiche

Versione Descrizione
2.1.0 Now allows a string representing the color as first and third parameter. Previous versions allow only an ImagickPixel object.



Imagick::colorizeImage

(PECL imagick 2.0.0)

Imagick::colorizeImageBlends the fill color with the image

Descrizione

bool Imagick::colorizeImage ( mixed $colorize , mixed $opacity )

Blends the fill color with each pixel in the image.

Elenco dei parametri

colorize

ImagickPixel object or a string containing the colorize color

opacity

ImagickPixel object or an float containing the opacity value. 1.0 is fully opaque and 0.0 is fully transparent.

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.

Log delle modifiche

Versione Descrizione
2.1.0 Now allows a string representing the color as the first parameter and a float representing the opacity value as the second parameter. Previous versions allow only an ImagickPixel objects.



Imagick::combineImages

(PECL imagick 2.0.0)

Imagick::combineImagesCombines one or more images into a single image

Descrizione

Imagick Imagick::combineImages ( int $channelType )

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

Elenco dei parametri

channelType

Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channeltype constants using bitwise operators. Refer to this list of channel constants.

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::commentImage

(PECL imagick 2.0.0)

Imagick::commentImageAdds a comment to your image

Descrizione

bool Imagick::commentImage ( string $comment )

Adds a comment to your image.

Elenco dei parametri

comment

The comment to add

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.

Esempi

Example #1 Using Imagick::commentImage():

Commenting an image and retrieving the comment:

<?php

/* Create new Imagick object */
$im = new imagick();

/* Create an empty image */
$im->newImage(100100, new ImagickPixel("red"));

/* Add comment to the image */
$im->commentImage("Hello World!");

/* Display the comment */
echo $im->getImageProperty("comment");

?>



Imagick::compareImageChannels

(PECL imagick 2.0.0)

Imagick::compareImageChannelsReturns the difference in one or more images

Descrizione

array Imagick::compareImageChannels ( Imagick $image , int $channelType , int $metricType )

Compares one or more images and returns the difference image.

Elenco dei parametri

image

Imagick object containing the image to compare.

channelType

Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channeltype constants using bitwise operators. Refer to this list of channel constants.

metricType

One of the metric type constants.

Valori restituiti

Array consisting of new_wand and distortion.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::compareImageLayers

(PECL imagick 2.0.0)

Imagick::compareImageLayersReturns the maximum bounding region between images

Descrizione

Imagick Imagick::compareImageLayers ( int $method )

Compares each image with the next in a sequence and returns the maximum bounding region of any pixel differences it discovers. Questo metodo è disponibile se Imagick è stato compilato con ImageMagick versione 6.2.9 o successive.

Elenco dei parametri

method

One of the layer method constants.

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.

Esempi

Example #1 Using Imagick::compareImageLayers()

Comparing image layers

<?php
/* create new imagick object */
$im = new Imagick("test.gif");

/* optimize the image layers */
$result $im->compareImageLayers(imagick::LAYERMETHOD_COALESCE);

/* work on the $result */
?>

Vedere anche:



Imagick::compareImages

(PECL imagick 2.0.0)

Imagick::compareImagesCompares an image to a reconstructed image

Descrizione

array Imagick::compareImages ( Imagick $compare , int $metric )

Returns an array containing a reconstructed image and the difference between images.

Elenco dei parametri

compare

An image to compare to.

metric

Provide a valid metric type constant. Refer to this list of metric constants.

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.

Esempi

Example #1 Using Imagick::compareImages():

Compare images and display the reconstructed image

<?php

$image1 
= new imagick("image1.png");
$image2 = new imagick("image2.png");

$result $image1->compareImages($image2Imagick::METRIC_MEANSQUAREERROR);
$result[0]->setImageFormat("png");

header("Content-Type: image/png");
echo 
$result[0];

?>



Imagick::compositeImage

(PECL imagick 2.0.0)

Imagick::compositeImageComposite one image onto another

Descrizione

bool Imagick::compositeImage ( Imagick $composite_object , int $composite , int $x , int $y [, int $channel = Imagick::CHANNEL_ALL ] )

Composite one image onto another at the specified offset.

Elenco dei parametri

composite_object

Imagick object which holds the composite image

compose

Composite operator. See Composite Operator Constants

x

The column offset of the composited image

y

The row offset of the composited image

channel

Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channeltype constants using bitwise operators. Refer to this list of channel constants.

Valori restituiti

Restituisce TRUE in caso di successo.



Imagick::__construct

(PECL imagick 2.0.0)

Imagick::__constructThe Imagick constructor

Descrizione

Imagick::__construct ( mixed $files )

Creates an Imagick instance for a specified image or set of images.

Elenco dei parametri

files

The path to an image to load or an array of paths. Paths can include wildcards for file names, or can be URLs.

Valori restituiti

Returns a new Imagick object on success.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::contrastImage

(PECL imagick 2.0.0)

Imagick::contrastImageChange the contrast of the image

Descrizione

bool Imagick::contrastImage ( bool $sharpen )

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.

Elenco dei parametri

sharpen

The sharpen value

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::contrastStretchImage

(PECL imagick 2.0.0)

Imagick::contrastStretchImageEnhances the contrast of a color image

Descrizione

bool Imagick::contrastStretchImage ( float $black_point , float $white_point [, int $channel = Imagick::CHANNEL_ALL ] )

Enhances the contrast of a color image by adjusting the pixels color to span the entire range of colors available. Questo metodo è disponibile se Imagick è stato compilato con ImageMagick versione 6.2.9 o successive.

Elenco dei parametri

black_point

The black point.

white_point

The white point.

channel

Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channeltype constants using bitwise operators. Imagick::CHANNEL_ALL. Refer to this list of channel constants.

Valori restituiti

Restituisce TRUE in caso di successo.



Imagick::convolveImage

(PECL imagick 2.0.0)

Imagick::convolveImageApplies a custom convolution kernel to the image

Descrizione

bool Imagick::convolveImage ( array $kernel [, int $channel = Imagick::CHANNEL_ALL ] )

Applies a custom convolution kernel to the image.

Elenco dei parametri

kernel

The convolution kernel

channel

Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channeltype constants using bitwise operators. Refer to this list of channel constants.

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::cropImage

(PECL imagick 2.0.0)

Imagick::cropImageExtracts a region of the image

Descrizione

bool Imagick::cropImage ( int $width , int $height , int $x , int $y )

Extracts a region of the image.

Elenco dei parametri

width

The width of the crop

height

The height of the crop

x

The X coordinate of the cropped region's top left corner

y

The Y coordinate of the cropped region's top left corner

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::cropThumbnailImage

(PECL imagick 2.0.0)

Imagick::cropThumbnailImageCreates a crop thumbnail

Descrizione

bool Imagick::cropThumbnailImage ( int $width , int $height )

Creates a fixed size thumbnail by first scaling the image up or down and cropping a specified area from the center.

Elenco dei parametri

width

The width of the thumbnail

height

The Height of the thumbnail

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::current

(PECL imagick 2.0.0)

Imagick::currentReturns a reference to the current Imagick object

Descrizione

Imagick Imagick::current ( void )

Returns reference to the current imagick object with image pointer at the correct sequence.

Valori restituiti

Returns self on success.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::cycleColormapImage

(PECL imagick 2.0.0)

Imagick::cycleColormapImageDisplaces an image's colormap

Descrizione

bool Imagick::cycleColormapImage ( int $displace )

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

Elenco dei parametri

displace

The amount to displace the colormap.

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::decipherImage

(No version information available, might only be in Git)

Imagick::decipherImageDeciphers an image

Descrizione

bool Imagick::decipherImage ( string $passphrase )

Deciphers image that has been enciphered before. The image must be enciphered using Imagick::encipherImage(). Questo metodo è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.9 o successive.

Elenco dei parametri

passphrase

The passphrase

Valori restituiti

Restituisce TRUE in caso di successo.

Vedere anche:



Imagick::deconstructImages

(PECL imagick 2.0.0)

Imagick::deconstructImagesReturns certain pixel differences between images

Descrizione

Imagick Imagick::deconstructImages ( void )

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

Valori restituiti

Returns a new Imagick object on success.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::deleteImageArtifact

(No version information available, might only be in Git)

Imagick::deleteImageArtifactDelete image artifact

Descrizione

bool Imagick::deleteImageArtifact ( string $artifact )

Deletes an artifact associated with the image. The difference between image properties and image artifacts is that properties are public and artifacts are private. Questo metodo è disponibile se Imagick è stato compilato con ImageMagick versione 6.5.7 o successive.

Elenco dei parametri

artifact

The name of the artifact to delete

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.

Vedere anche:



Imagick::deskewImage

(No version information available, might only be in Git)

Imagick::deskewImageRemoves skew from the image

Descrizione

public bool Imagick::deskewImage ( float $threshold )

This method can be used to remove skew from for example scanned images where the paper was not properly placed on the scanning surface. Questo metodo è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.5 o successive.

Elenco dei parametri

threshold

Deskew threshold

Valori restituiti



Imagick::despeckleImage

(PECL imagick 2.0.0)

Imagick::despeckleImageReduces the speckle noise in an image

Descrizione

bool Imagick::despeckleImage ( void )

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

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::destroy

(PECL imagick 2.0.0)

Imagick::destroyDestroys the Imagick object

Descrizione

bool Imagick::destroy ( void )

Destroys the Imagick object and frees all resources associated with it. This method is deprecated in favour of Imagick::clear.

Valori restituiti

Restituisce TRUE in caso di successo.



Imagick::displayImage

(PECL imagick 2.0.0)

Imagick::displayImageDisplays an image

Descrizione

bool Imagick::displayImage ( string $servername )

This method displays an image on a X server.

Elenco dei parametri

servername

The X server name

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::displayImages

(PECL imagick 2.0.0)

Imagick::displayImagesDisplays an image or image sequence

Descrizione

bool Imagick::displayImages ( string $servername )

Displays an image or image sequence on a X server.

Elenco dei parametri

servername

The X server name

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::distortImage

(PECL imagick 2.0.1)

Imagick::distortImageDistorts an image using various distortion methods

Descrizione

bool Imagick::distortImage ( int $method , array $arguments , bool $bestfit )

Distorts an image using various distortion methods, by mapping color lookups of the source image to a new destination image usually 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.

Questo metodo è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.6 o successive.

Elenco dei parametri

method

The method of image distortion. See distortion constants

arguments

The arguments for this distortion method

bestfit

Attempt to resize destination to fit distorted source

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.

Esempi

Example #1 Using Imagick::distortImage():

Distort an image and display to the browser.

<?php
/* Create new object */
$im = new Imagick();

/* Create new checkerboard pattern */
$im->newPseudoImage(100100"pattern:checkerboard");

/* Set the image format to png */
$im->setImageFormat('png');

/* Fill new visible areas with transparent */
$im->setImageVirtualPixelMethod(Imagick::VIRTUALPIXELMETHOD_TRANSPARENT);

/* Activate matte */
$im->setImageMatte(true);

/* Control points for the distortion */
$controlPoints = array( 1010
                        
105,

                        
10$im->getImageHeight() - 20,
                        
10$im->getImageHeight() - 5,

                        
$im->getImageWidth() - 1010,
                        
$im->getImageWidth() - 1020,

                        
$im->getImageWidth() - 10$im->getImageHeight() - 10,
                        
$im->getImageWidth() - 10$im->getImageHeight() - 30);

/* Perform the distortion */                       
$im->distortImage(Imagick::DISTORTION_PERSPECTIVE$controlPointstrue);

/* Ouput the image */
header("Content-Type: image/png");
echo 
$im;
?>

Il precedente esempio visualizzerà qualcosa simile a:

Output of example : Using Imagick::distortImage()

Vedere anche:



Imagick::drawImage

(PECL imagick 2.0.0)

Imagick::drawImageRenders the ImagickDraw object on the current image

Descrizione

bool Imagick::drawImage ( ImagickDraw $draw )

Renders the ImagickDraw object on the current image.

Elenco dei parametri

draw

The drawing operations to render on the image.

Valori restituiti

Restituisce TRUE in caso di successo.



Imagick::edgeImage

(PECL imagick 2.0.0)

Imagick::edgeImageEnhance edges within the image

Descrizione

bool Imagick::edgeImage ( float $radius )

Enhance edges within the image with a convolution filter of the given radius. Use radius 0 and it will be auto-selected.

Elenco dei parametri

radius

The radius of the operation.

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::embossImage

(PECL imagick 2.0.0)

Imagick::embossImageReturns a grayscale image with a three-dimensional effect

Descrizione

bool Imagick::embossImage ( float $radius , float $sigma )

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 it will choose a suitable radius for you.

Elenco dei parametri

radius

The radius of the effect

sigma

The sigma of the effect

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::encipherImage

(No version information available, might only be in Git)

Imagick::encipherImageEnciphers an image

Descrizione

bool Imagick::encipherImage ( string $passphrase )

Converts plain pixels to enciphered pixels. The image is not readable until it has been deciphered using Imagick::decipherImage() Questo metodo è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.9 o successive.

Elenco dei parametri

passphrase

The passphrase

Valori restituiti

Restituisce TRUE in caso di successo.

Vedere anche:



Imagick::enhanceImage

(PECL imagick 2.0.0)

Imagick::enhanceImageImproves the quality of a noisy image

Descrizione

bool Imagick::enhanceImage ( void )

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

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::equalizeImage

(PECL imagick 2.0.0)

Imagick::equalizeImageEqualizes the image histogram

Descrizione

bool Imagick::equalizeImage ( void )

Equalizes the image histogram.

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::evaluateImage

(PECL imagick 2.0.0)

Imagick::evaluateImageApplies an expression to an image

Descrizione

bool Imagick::evaluateImage ( int $op , float $constant [, int $channel = Imagick::CHANNEL_ALL ] )

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.

Elenco dei parametri

op

The evaluation operator

constant

The value of the operator

channel

Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channeltype constants using bitwise operators. Refer to this list of channel constants.

Esempi

Example #1 Using Imagick::evaluateImage()

Using evaluateImage to reduce opacity in an image.

<?php
// Create new object with the image
$im = new Imagick('example-alpha.png');

// Reduce the alpha by 50%
$im->evaluateImage(Imagick::EVALUATE_DIVIDE2Imagick::CHANNEL_ALPHA);

// Output the image
header("Content-Type: image/png");
echo 
$im;
?>

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::exportImagePixels

(No version information available, might only be in Git)

Imagick::exportImagePixelsExports raw image pixels

Descrizione

public array Imagick::exportImagePixels ( int $x , int $y , int $width , int $height , string $map , int $STORAGE )

Exports image pixels into an array. The map defines the ordering of the exported pixels. The size of the returned array is width * height * strlen(map). Questo metodo è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.7 o successive.

Elenco dei parametri

x

X-coordinate of the exported area

y

Y-coordinate of the exported area

width

Width of the exported aread

height

Height of the exported area

map

Ordering of the exported pixels. For example "RGB". Valid characters for the map are R, G, B, A, O, C, Y, M, K, I and P.

STORAGE

Refer to this list of pixel type constants

Esempi

Example #1 Using Imagick::exportImagePixels()

Export image pixels into an array

<?php

/* Create new object */
$im = new Imagick();

/* Create new image */
$im->newPseudoImage(00"magick:rose");

/* Export the image pixels */
$pixels $im->exportImagePixels(101022"RGB"Imagick::PIXEL_CHAR);

/* Output */
var_dump($pixels);
?>

Il precedente esempio visualizzerà:

array(12) {
  [0]=>
  int(72)
  [1]=>
  int(64)
  [2]=>
  int(57)
  [3]=>
  int(69)
  [4]=>
  int(59)
  [5]=>
  int(43)
  [6]=>
  int(124)
  [7]=>
  int(120)
  [8]=>
  int(-96)
  [9]=>
  int(91)
  [10]=>
  int(84)
  [11]=>
  int(111)
}

Valori restituiti

Returns an array containing the pixels values.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::extentImage

(No version information available, might only be in Git)

Imagick::extentImageSet image size

Descrizione

bool Imagick::extentImage ( int $width , int $height , int $x , int $y )

Comfortability method for setting image size. The method sets the image size and allows setting x,y coordinates where the new area begins. Questo metodo è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.1 o successive.

Elenco dei parametri

width

The new width

height

The new height

x

X position for the new size

y

Y position for the new size

Valori restituiti

Restituisce TRUE in caso di successo.

Vedere anche:



Imagick::flattenImages

(PECL imagick 2.0.0)

Imagick::flattenImagesMerges a sequence of images

Descrizione

Imagick Imagick::flattenImages ( void )

Merges a sequence of images. This is useful for combining Photoshop layers into a single image.

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::flipImage

(PECL imagick 2.0.0)

Imagick::flipImageCreates a vertical mirror image

Descrizione

bool Imagick::flipImage ( void )

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

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::floodFillPaintImage

(No version information available, might only be in Git)

Imagick::floodFillPaintImageChanges the color value of any pixel that matches target

Descrizione

bool Imagick::floodFillPaintImage ( mixed $fill , float $fuzz , mixed $target , int $x , int $y , bool $invert [, int $channel = Imagick::CHANNEL_DEFAULT ] )

Changes the color value of any pixel that matches target and is an immediate neighbor. This method is a replacement for deprecated Imagick::paintFloodFillImage(). Questo metodo è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.8 o successive.

Elenco dei parametri

fill

ImagickPixel object or a string containing the fill color

fuzz

The amount of fuzz. For example, set fuzz to 10 and the color red at intensities of 100 and 102 respectively are now interpreted as the same color.

target

ImagickPixel object or a string containing the target color to paint

x

X start position of the floodfill

y

Y start position of the floodfill

invert

If TRUE paints any pixel that does not match the target color.

channel

Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Per default è Imagick::CHANNEL_DEFAULT. Fare riferimento a questa lista di costanti di canale

Valori restituiti

Restituisce TRUE in caso di successo.

Esempi

Example #1 Imagick::floodfillPaintImage() example

<?php

/* Create new imagick object */
$im = new Imagick();

/* create red, green and blue images */
$im->newImage(10050"red");
$im->newImage(10050"green");
$im->newImage(10050"blue");

/* Append the images into one */
$im->resetIterator();
$combined $im->appendImages(true);

/* Save the intermediate image for comparison */
$combined->writeImage("floodfillpaint_intermediate.png");

/* The target pixel to paint */
$x 1;
$y 1;

/* Get the color we are painting */
$target $combined->getImagePixelColor($x$y);

/* Paints pixel in position 1,1 black and all neighboring 
   pixels that match the target color */
$combined->floodfillPaintImage("black"1$target$x$yfalse);

/* Save the result */
$combined->writeImage("floodfillpaint_result.png");
?>

Il precedente esempio visualizzerà qualcosa simile a:

Output of example : Imagick::floodfillPaintImage()
Output of example : Imagick::floodfillPaintImage()



Imagick::flopImage

(PECL imagick 2.0.0)

Imagick::flopImageCreates a horizontal mirror image

Descrizione

bool Imagick::flopImage ( void )

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

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::frameImage

(PECL imagick 2.0.0)

Imagick::frameImageAdds a simulated three-dimensional border

Descrizione

bool Imagick::frameImage ( mixed $matte_color , int $width , int $height , int $inner_bevel , int $outer_bevel )

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.

Elenco dei parametri

matte_color

ImagickPixel object or a string representing the matte color

width

The width of the border

height

The height of the border

inner_bevel

The inner bevel width

outer_bevel

The outer bevel width

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.

Log delle modifiche

Versione Descrizione
2.1.0 Now allows a string representing the color as the first parameter. Previous versions allow only an ImagickPixel object.



Imagick::functionImage

(No version information available, might only be in Git)

Imagick::functionImageApplies a function on the image

Descrizione

public bool Imagick::functionImage ( int $function , array $arguments [, int $channel = Imagick::CHANNEL_DEFAULT ] )

Applies an arithmetic, relational, or logical expression to a pseudo image.

See also » ImageMagick v6 Examples - Image Transformations — Function, Multi-Argument Evaluate

Questo metodo è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.9 o successive.

Elenco dei parametri

function

Refer to this list of function constants

arguments

Array of arguments to pass to this function.

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.

Esempi

Example #1 Create a sinusoidal gradient

<?php
$imagick 
= new Imagick();
$imagick->newPseudoImage(200200'gradient:black-white');
$arguments = array(3, -90);
$imagick->functionImage(Imagick::FUNCTION_SINUSOID$arguments);

header("Content-Type: image/png");
$imagick->setImageFormat("png");
echo 
$imagick->getImageBlob();
?>

Il precedente esempio visualizzerà qualcosa simile a:

Output of create a sinusoidal gradient

Example #2 Create a gradient from the polynomial (4x^2 - 4x + 1)

<?php
$imagick 
= new Imagick();
$imagick->newPseudoImage(200200'gradient:black-white');
$arguments = array(4, -41);
$imagick->functionImage(Imagick::FUNCTION_POLYNOMIAL$arguments);

header("Content-Type: image/png");
$imagick->setimageformat("png");
echo 
$imagick->getImageBlob();
?>

Il precedente esempio visualizzerà qualcosa simile a:

Output of create a polynomial gradient

Example #3 Create a complex gradient from the polynomial (4x^2 - 4x^2 + 1) modulated by a sinusoidal gradient

<?php
$imagick1 
= new Imagick();
$imagick1->newPseudoImage(200200'gradient:black-white');
$arguments = array(9, -90);
$imagick1->functionImage(Imagick::FUNCTION_SINUSOID$arguments);

$imagick2 = new Imagick();
$imagick2->newPseudoImage(200200'gradient:black-white');
$arguments = array(0.50);
$imagick2->functionImage(Imagick::FUNCTION_SINUSOID$arguments);
$imagick1->compositeimage($imagick2Imagick::COMPOSITE_MULTIPLY00);

header("Content-Type: image/png");
$imagick1->setImageFormat("png");
echo 
$imagick1->getImageBlob();
?>

Il precedente esempio visualizzerà qualcosa simile a:

Output of create complex gradient



Imagick::fxImage

(PECL imagick 2.0.0)

Imagick::fxImageEvaluate expression for each pixel in the image

Descrizione

Imagick Imagick::fxImage ( string $expression [, int $channel = Imagick::CHANNEL_ALL ] )

Evaluate expression for each pixel in the image. Consult » The Fx Special Effects Image Operator for more information.

Elenco dei parametri

expression

The expression.

channel

Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channeltype constants using bitwise operators. Refer to this list of channel constants.

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::gammaImage

(PECL imagick 2.0.0)

Imagick::gammaImageGamma-corrects an image

Descrizione

bool Imagick::gammaImage ( float $gamma [, int $channel = Imagick::CHANNEL_ALL ] )

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.

Elenco dei parametri

gamma

The amount of gamma-correction.

channel

Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channeltype constants using bitwise operators. Refer to this list of channel constants.

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::gaussianBlurImage

(PECL imagick 2.0.0)

Imagick::gaussianBlurImageBlurs an image

Descrizione

bool Imagick::gaussianBlurImage ( float $radius , float $sigma [, int $channel = Imagick::CHANNEL_ALL ] )

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 selects a suitable radius for you.

Elenco dei parametri

radius

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

sigma

The standard deviation of the Gaussian, in pixels.

channel

Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channeltype constants using bitwise operators. Refer to this list of channel constants.

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getColorspace

(PECL imagick 0.9.10-0.9.9)

Imagick::getColorspaceGets the colorspace

Descrizione

int Imagick::getColorspace ( void )

Gets the global colorspace value. Questo metodo è disponibile se Imagick è stato compilato con ImageMagick versione 6.5.7 o successive.

Valori restituiti

Returns an integer which can be compared against COLORSPACE constants.



Imagick::getCompression

(PECL imagick 2.0.0)

Imagick::getCompressionGets the object compression type

Descrizione

int Imagick::getCompression ( void )

Gets the object compression type.

Valori restituiti

Returns the compression constant



Imagick::getCompressionQuality

(PECL imagick 2.0.0)

Imagick::getCompressionQualityGets the object compression quality

Descrizione

int Imagick::getCompressionQuality ( void )

Gets the object compression quality.

Valori restituiti

Returns integer describing the compression quality



Imagick::getCopyright

(PECL imagick 2.0.0)

Imagick::getCopyrightReturns the ImageMagick API copyright as a string

Descrizione

string Imagick::getCopyright ( void )

Returns the ImageMagick API copyright as a string.

Valori restituiti

Returns a string containing the copyright notice of Imagemagick and Magickwand C API.



Imagick::getFilename

(PECL imagick 2.0.0)

Imagick::getFilenameThe filename associated with an image sequence

Descrizione

string Imagick::getFilename ( void )

Returns the filename associated with an image sequence.

Valori restituiti

Returns a string on success.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getFont

(PECL imagick 2.1.0)

Imagick::getFontGets font

Descrizione

string Imagick::getFont ( void )

Returns the objects font property. Questo metodo è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.7 o successive.

Valori restituiti

Returns the string containing the font name or FALSE if not font is set.

Vedere anche:



Imagick::getFormat

(PECL imagick 2.0.0)

Imagick::getFormatReturns the format of the Imagick object

Descrizione

string Imagick::getFormat ( void )

Returns the format of the Imagick object.

Valori restituiti

Returns the format of the image.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getGravity

(No version information available, might only be in Git)

Imagick::getGravityGets the gravity

Descrizione

int Imagick::getGravity ( void )

Gets the global gravity property for the Imagick object. Questo metodo è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.0 o successive.

Valori restituiti

Returns the gravity property. Refer to the list of gravity constants.



Imagick::getHomeURL

(PECL imagick 2.0.0)

Imagick::getHomeURLReturns the ImageMagick home URL

Descrizione

string Imagick::getHomeURL ( void )

Returns the ImageMagick home URL.

Valori restituiti

Returns a link to the imagemagick homepage.



Imagick::getImage

(PECL imagick 2.0.0)

Imagick::getImageReturns a new Imagick object

Descrizione

Imagick Imagick::getImage ( void )

Returns a new Imagick object with the current image sequence.

Valori restituiti

Returns a new Imagick object with the current image sequence.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getImageAlphaChannel

(No version information available, might only be in Git)

Imagick::getImageAlphaChannelGets the image alpha channel

Descrizione

int Imagick::getImageAlphaChannel ( void )

Gets the image alpha channel value. The returned value is one of the alpha channel constants. Questo metodo è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.0 o successive.

Valori restituiti

Returns a constant defining the current alpha channel value. Refer to this list of alpha channel constants.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getImageArtifact

(No version information available, might only be in Git)

Imagick::getImageArtifactGet image artifact

Descrizione

string Imagick::getImageArtifact ( string $artifact )

Gets an artifact associated with the image. The difference between image properties and image artifacts is that properties are public and artifacts are private. Questo metodo è disponibile se Imagick è stato compilato con ImageMagick versione 6.5.7 o successive.

Elenco dei parametri

artifact

The name of the artifact

Valori restituiti

Returns the artifact value on success.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.

Vedere anche:



Imagick::getImageBackgroundColor

(PECL imagick 2.0.0)

Imagick::getImageBackgroundColorReturns the image background color

Descrizione

ImagickPixel Imagick::getImageBackgroundColor ( void )

Returns the image background color.

Valori restituiti

Returns an ImagickPixel set to the background color of the image.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getImageBlob

(PECL imagick 2.0.0)

Imagick::getImageBlobReturns the image sequence as a blob

Descrizione

string Imagick::getImageBlob ( void )

Implements direct to memory image formats. It returns the image sequence as a string. The format of the image determines the format of the returned blob (GIF, JPEG, PNG, etc.). To return a different image format, use Imagick::setImageFormat().

Valori restituiti

Returns a string containing the image.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getImageBluePrimary

(PECL imagick 2.0.0)

Imagick::getImageBluePrimaryReturns the chromaticy blue primary point

Descrizione

array Imagick::getImageBluePrimary ( void )

Returns the chromaticity blue primary point for the image.

Elenco dei parametri

x

The chromaticity blue primary x-point.

y

The chromaticity blue primary y-point.

Valori restituiti

Array consisting of "x" and "y" coordinates of point.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getImageBorderColor

(PECL imagick 2.0.0)

Imagick::getImageBorderColorReturns the image border color

Descrizione

ImagickPixel Imagick::getImageBorderColor ( void )

Returns the image border color.

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getImageChannelDepth

(PECL imagick 2.0.0)

Imagick::getImageChannelDepthGets the depth for a particular image channel

Descrizione

int Imagick::getImageChannelDepth ( int $channel )

Gets the depth for a particular image channel.

Elenco dei parametri

channel

Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Per default è Imagick::CHANNEL_DEFAULT. Fare riferimento a questa lista di costanti di canale

Valori restituiti

Restituisce TRUE in caso di successo.



Imagick::getImageChannelDistortion

(PECL imagick 2.0.0)

Imagick::getImageChannelDistortionCompares image channels of an image to a reconstructed image

Descrizione

float Imagick::getImageChannelDistortion ( Imagick $reference , int $channel , int $metric )

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

Elenco dei parametri

reference

Imagick object to compare to.

channel

Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channeltype constants using bitwise operators. Refer to this list of channel constants.

metric

One of the metric type constants.

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getImageChannelDistortions

(No version information available, might only be in Git)

Imagick::getImageChannelDistortionsGets channel distortions

Descrizione

float Imagick::getImageChannelDistortions ( Imagick $reference , int $metric [, int $channel = Imagick::CHANNEL_DEFAULT ] )

Compares one or more image channels of an image to a reconstructed image and returns the specified distortion metrics Questo metodo è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.4 o successive.

Elenco dei parametri

reference

Imagick object containing the reference image

metric

Refer to this list of metric type constants.

channel

Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Per default è Imagick::CHANNEL_DEFAULT. Fare riferimento a questa lista di costanti di canale

Valori restituiti

Returns a double describing the channel distortion.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getImageChannelExtrema

(PECL imagick 2.0.0)

Imagick::getImageChannelExtremaGets the extrema for one or more image channels

Descrizione

array Imagick::getImageChannelExtrema ( int $channel )

Gets the extrema for one or more image channels. Return value is an associative array with the keys "minima" and "maxima".

Elenco dei parametri

channel

Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channeltype constants using bitwise operators. Refer to this list of channel constants.

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getImageChannelKurtosis

(No version information available, might only be in Git)

Imagick::getImageChannelKurtosisThe getImageChannelKurtosis purpose

Descrizione

public array Imagick::getImageChannelKurtosis ([ int $channel = Imagick::CHANNEL_DEFAULT ] )

Get the kurtosis and skewness of a specific channel. Questo metodo è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.9 o successive.

Elenco dei parametri

channel

Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Per default è Imagick::CHANNEL_DEFAULT. Fare riferimento a questa lista di costanti di canale

Valori restituiti

Returns an array with kurtosis and skewness members.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getImageChannelMean

(PECL imagick 2.0.0)

Imagick::getImageChannelMeanGets the mean and standard deviation

Descrizione

array Imagick::getImageChannelMean ( int $channel )

Gets the mean and standard deviation of one or more image channels. Return value is an associative array with the keys "mean" and "standardDeviation".

Elenco dei parametri

channel

Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channeltype constants using bitwise operators. Refer to this list of channel constants.

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getImageChannelRange

(PECL imagick 2.2.1)

Imagick::getImageChannelRangeGets channel range

Descrizione

array Imagick::getImageChannelRange ( int $channel )

Gets the range for one or more image channels. Questo metodo è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.0 o successive.

Elenco dei parametri

channel

Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Per default è Imagick::CHANNEL_DEFAULT. Fare riferimento a questa lista di costanti di canale

Valori restituiti

Returns an array containing minima and maxima values of the channel(s).

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getImageChannelStatistics

(PECL imagick 2.0.0)

Imagick::getImageChannelStatisticsReturns statistics for each channel in the image

Descrizione

array Imagick::getImageChannelStatistics ( void )

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

Valori restituiti

Restituisce TRUE in caso di successo.



Imagick::getImageClipMask

(No version information available, might only be in Git)

Imagick::getImageClipMaskGets image clip mask

Descrizione

Imagick Imagick::getImageClipMask ( void )

Returns the image clip mask. The clip mask is an Imagick object containing the clip mask. Questo metodo è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.6 o successive.

Valori restituiti

Returns an Imagick object containing the clip mask.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getImageColormapColor

(PECL imagick 2.0.0)

Imagick::getImageColormapColorReturns the color of the specified colormap index

Descrizione

ImagickPixel Imagick::getImageColormapColor ( int $index )

Returns the color of the specified colormap index.

Elenco dei parametri

index

The offset into the image colormap.

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getImageColors

(PECL imagick 2.0.0)

Imagick::getImageColorsGets the number of unique colors in the image

Descrizione

int Imagick::getImageColors ( void )

Gets the number of unique colors in the image.

Valori restituiti

Restituisce TRUE in caso di successo.



Imagick::getImageColorspace

(PECL imagick 2.0.0)

Imagick::getImageColorspaceGets the image colorspace

Descrizione

int Imagick::getImageColorspace ( void )

Gets the image colorspace.

Valori restituiti

Restituisce TRUE in caso di successo.



Imagick::getImageCompose

(PECL imagick 2.0.0)

Imagick::getImageComposeReturns the composite operator associated with the image

Descrizione

int Imagick::getImageCompose ( void )

Returns the composite operator associated with the image.

Valori restituiti

Restituisce TRUE in caso di successo.



Imagick::getImageCompression

(PECL imagick 2.2.2)

Imagick::getImageCompressionGets the current image's compression type

Descrizione

int Imagick::getImageCompression ( void )

Gets the current image's compression type.

Valori restituiti

Returns the compression constant



Imagick::getImageCompressionQuality

(PECL imagick 2.2.2)

Imagick::getImageCompressionQualityGets the current image's compression quality

Descrizione

int Imagick::getImageCompressionQuality ( void )

Gets the current image's compression quality

Valori restituiti

Returns integer describing the images compression quality



Imagick::getImageDelay

(PECL imagick 2.0.0)

Imagick::getImageDelayGets the image delay

Descrizione

int Imagick::getImageDelay ( void )

Gets the image delay.

Valori restituiti

Returns the image delay.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getImageDepth

(PECL imagick 0.9.1-0.9.9)

Imagick::getImageDepthGets the image depth

Descrizione

int Imagick::getImageDepth ( void )

Gets the image depth.

Valori restituiti

The image depth.



Imagick::getImageDispose

(PECL imagick 2.0.0)

Imagick::getImageDisposeGets the image disposal method

Descrizione

int Imagick::getImageDispose ( void )

Gets the image disposal method.

Valori restituiti

Returns the dispose method on success.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getImageDistortion

(PECL imagick 2.0.0)

Imagick::getImageDistortionCompares an image to a reconstructed image

Descrizione

float Imagick::getImageDistortion ( MagickWand $reference , int $metric )

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

Elenco dei parametri

reference

Imagick object to compare to.

metric

One of the metric type constants.

Valori restituiti

Returns the distortion metric used on the image (or the best guess thereof).

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getImageExtrema

(PECL imagick 2.0.0)

Imagick::getImageExtremaGets the extrema for the image

Descrizione

array Imagick::getImageExtrema ( void )

Gets the extrema for the image. Returns an associative array with the keys "min" and "max".

Valori restituiti

Returns an associative array with the keys "min" and "max".

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getImageFilename

(PECL imagick 2.0.0)

Imagick::getImageFilenameReturns the filename of a particular image in a sequence

Descrizione

string Imagick::getImageFilename ( void )

Returns the filename of a particular image in a sequence.

Valori restituiti

Returns a string with the filename of the image.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getImageFormat

(PECL imagick 2.0.0)

Imagick::getImageFormatReturns the format of a particular image in a sequence

Descrizione

string Imagick::getImageFormat ( void )

Returns the format of a particular image in a sequence.

Valori restituiti

Returns a string containing the image format on success.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getImageGamma

(PECL imagick 2.0.0)

Imagick::getImageGammaGets the image gamma

Descrizione

float Imagick::getImageGamma ( void )

Gets the image gamma.

Valori restituiti

Returns the image gamma on success.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getImageGeometry

(PECL imagick 2.0.0)

Imagick::getImageGeometryGets the width and height as an associative array

Descrizione

array Imagick::getImageGeometry ( void )

Returns the width and height as an associative array.

Valori restituiti

Returns an array with the width/height of the image.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getImageGravity

(No version information available, might only be in Git)

Imagick::getImageGravityGets the image gravity

Descrizione

int Imagick::getImageGravity ( void )

Gets the current gravity value of the image. Unlike Imagick::getGravity(), this method returns the gravity defined for the current image sequence. Questo metodo è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.4 o successive.

Valori restituiti

Returns the images gravity property. Refer to the list of gravity constants.



Imagick::getImageGreenPrimary

(PECL imagick 2.0.0)

Imagick::getImageGreenPrimaryReturns the chromaticy green primary point

Descrizione

array Imagick::getImageGreenPrimary ( void )

Returns the chromaticity green primary point. Returns an array with the keys "x" and "y".

Valori restituiti

Returns an array with the keys "x" and "y" on success, throws an ImagickException on failure.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getImageHeight

(PECL imagick 2.0.0)

Imagick::getImageHeightReturns the image height

Descrizione

int Imagick::getImageHeight ( void )

Returns the image height.

Valori restituiti

Returns the image height in pixels.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getImageHistogram

(PECL imagick 2.0.0)

Imagick::getImageHistogramGets the image histogram

Descrizione

array Imagick::getImageHistogram ( void )

Returns the image histogram as an array of ImagickPixel objects.

Valori restituiti

Returns the image histogram as an array of ImagickPixel objects.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getImageIndex

(PECL imagick 2.0.0)

Imagick::getImageIndexGets the index of the current active image

Descrizione

int Imagick::getImageIndex ( void )

Returns the index of the current active image within the Imagick object. This method has been deprecated. See Imagick::getIteratorIndex().

Valori restituiti

Returns an integer containing the index of the image in the stack.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getImageInterlaceScheme

(PECL imagick 2.0.0)

Imagick::getImageInterlaceSchemeGets the image interlace scheme

Descrizione

int Imagick::getImageInterlaceScheme ( void )

Gets the image interlace scheme.

Valori restituiti

Returns the interlace scheme as an integer on success. Throw an ImagickException on error.



Imagick::getImageInterpolateMethod

(PECL imagick 2.0.0)

Imagick::getImageInterpolateMethodReturns the interpolation method

Descrizione

int Imagick::getImageInterpolateMethod ( void )

Returns the interpolation method for the specified image. The method is one of the Imagick::INTERPOLATE_* constants.

Valori restituiti

Returns the interpolate method on success.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getImageIterations

(PECL imagick 2.0.0)

Imagick::getImageIterationsGets the image iterations

Descrizione

int Imagick::getImageIterations ( void )

Gets the image iterations.

Valori restituiti

Returns the image iterations as an integer.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getImageLength

(PECL imagick 2.0.0)

Imagick::getImageLengthReturns the image length in bytes

Descrizione

int Imagick::getImageLength ( void )

Returns the image length in bytes

Valori restituiti

Returns an int containing the current image size.

Esempi

Example #1 Using Imagick::getImageLength():

Getting image length in bytes

<?php
$image 
= new Imagick('test.jpg');
echo 
$image->getImageLength() . ' bytes';
?>



Imagick::getImageMagickLicense

(PECL imagick 2.0.0)

Imagick::getImageMagickLicenseReturns a string containing the ImageMagick license

Descrizione

string Imagick::getImageMagickLicense ( void )

Returns a string containing the ImageMagick license

Valori restituiti

Returns a string containing the ImageMagick license.



Imagick::getImageMatte

(PECL imagick 2.0.0)

Imagick::getImageMatteReturn if the image has a matte channel

Descrizione

bool Imagick::getImageMatte ( void )

Returns TRUE if the image has a matte channel otherwise false. Questo metodo è disponibile se Imagick è stato compilato con ImageMagick versione 6.2.9 o successive.

Valori restituiti

Restituisce TRUE in caso di successo, FALSE in caso di fallimento.



Imagick::getImageMatteColor

(PECL imagick 2.0.0)

Imagick::getImageMatteColorReturns the image matte color

Descrizione

ImagickPixel Imagick::getImageMatteColor ( void )

Returns the image matte color.

Valori restituiti

Returns ImagickPixel object on success.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getImageOrientation

(PECL imagick 2.0.0)

Imagick::getImageOrientationGets the image orientation

Descrizione

int Imagick::getImageOrientation ( void )

Gets the image orientation. The return value is one of the orientation constants.

Valori restituiti

Returns an int on success.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getImagePage

(PECL imagick 2.0.0)

Imagick::getImagePageReturns the page geometry

Descrizione

array Imagick::getImagePage ( void )

Returns the page geometry associated with the image in an array with the keys "width", "height", "x", and "y".

Valori restituiti

Returns the page geometry associated with the image in an array with the keys "width", "height", "x", and "y".

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getImagePixelColor

(PECL imagick 2.0.0)

Imagick::getImagePixelColorReturns the color of the specified pixel

Descrizione

ImagickPixel Imagick::getImagePixelColor ( int $x , int $y )

Returns the color of the specified pixel.

Elenco dei parametri

x

The x-coordinate of the pixel

y

The y-coordinate of the pixel

Valori restituiti

Returns an ImagickPixel instance for the color at the coordinates given.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getImageProfile

(PECL imagick 2.0.0)

Imagick::getImageProfileReturns the named image profile

Descrizione

string Imagick::getImageProfile ( string $name )

Returns the named image profile.

Elenco dei parametri

name

The name of the profile to return.

Valori restituiti

Returns a string containing the image profile.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getImageProfiles

(PECL imagick 2.0.0)

Imagick::getImageProfilesReturns the image profiles

Descrizione

array Imagick::getImageProfiles ([ string $pattern = "*" [, bool $only_names = true ]] )

Returns all associated profiles that match the pattern. If TRUE is passed as second parameter only the profile names are returned. Questo metodo è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.6 o successive.

Elenco dei parametri

pattern

The pattern for profile names.

only_names

Whether to return only profile names. If FALSE then values are returned as well

Valori restituiti

Returns an array containing the image profiles or profile names.



Imagick::getImageProperties

(PECL imagick 2.0.0)

Imagick::getImagePropertiesReturns the image properties

Descrizione

array Imagick::getImageProperties ([ string $pattern = "*" [, bool $only_names = true ]] )

Returns all associated properties that match the pattern. If TRUE is passed as second parameter only the property names are returned. Questo metodo è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.6 o successive.

Elenco dei parametri

pattern

The pattern for property names.

only_names

Whether to return only property names. If FALSE then also the values are returned

Valori restituiti

Returns an array containing the image properties or property names.

Esempi

Example #1 Using Imagick::getImageProperties():

An example of extracting EXIF information.

<?php

/* Create the object */
$im = new imagick("/path/to/example.jpg");

/* Get the EXIF information */
$exifArray $im->getImageProperties("exif:*");

/* Loop trough the EXIF properties */
foreach ($exifArray as $name => $property)
{
    echo 
"{$name} => {$property}<br />\n"
}

?>



Imagick::getImageProperty

(PECL imagick 2.0.0)

Imagick::getImagePropertyReturns the named image property

Descrizione

string Imagick::getImageProperty ( string $name )

Returns the named image property. Questo metodo è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.2 o successive.

Elenco dei parametri

name

name of the property (for example Exif:DateTime)

Esempi

Example #1 Using Imagick::getImageProperty():

Setting and getting image property

<?php
$image 
= new Imagick();
$image->newImage(300200"black");

$image->setImageProperty('Exif:Make''Imagick');
echo 
$image->getImageProperty('Exif:Make');
?>

Vedere anche:

Valori restituiti

Returns a string containing the image property, false if a property with the given name does not exist.



Imagick::getImageRedPrimary

(PECL imagick 2.0.0)

Imagick::getImageRedPrimaryReturns the chromaticity red primary point

Descrizione

array Imagick::getImageRedPrimary ( void )

Returns the chromaticity red primary point as an array with the keys "x" and "y".

Valori restituiti

Returns the chromaticity red primary point as an array with the keys "x" and "y". Throw an ImagickException on error.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getImageRegion

(PECL imagick 2.0.0)

Imagick::getImageRegionExtracts a region of the image

Descrizione

Imagick Imagick::getImageRegion ( int $width , int $height , int $x , int $y )

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

Elenco dei parametri

width

The width of the extracted region.

height

The height of the extracted region.

x

X-coordinate of the top-left corner of the extracted region.

y

Y-coordinate of the top-left corner of the extracted region.

Valori restituiti

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

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getImageRenderingIntent

(PECL imagick 2.0.0)

Imagick::getImageRenderingIntentGets the image rendering intent

Descrizione

int Imagick::getImageRenderingIntent ( void )

Gets the image rendering intent.

Valori restituiti

Returns the image rendering intent.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getImageResolution

(PECL imagick 2.0.0)

Imagick::getImageResolutionGets the image X and Y resolution

Descrizione

array Imagick::getImageResolution ( void )

Gets the image X and Y resolution.

Valori restituiti

Returns the resolution as an array.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getImagesBlob

(PECL imagick 2.0.0)

Imagick::getImagesBlobReturns all image sequences as a blob

Descrizione

string Imagick::getImagesBlob ( void )

Implements direct to memory image formats. It returns all image sequences as a string. The format of the image determines the format of the returned blob (GIF, JPEG, PNG, etc.). To return a different image format, use Imagick::setImageFormat().

Valori restituiti

Returns a string containing the images. On failure, throws ImagickException.



Imagick::getImageScene

(PECL imagick 2.0.0)

Imagick::getImageSceneGets the image scene

Descrizione

int Imagick::getImageScene ( void )

Gets the image scene.

Valori restituiti

Returns the image scene.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getImageSignature

(PECL imagick 2.0.0)

Imagick::getImageSignatureGenerates an SHA-256 message digest

Descrizione

string Imagick::getImageSignature ( void )

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

Valori restituiti

Returns a string containing the SHA-256 hash of the file.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getImageSize

(PECL imagick 2.0.0)

Imagick::getImageSizeReturns the image length in bytes

Descrizione

int Imagick::getImageSize ( void )

Returns the image length in bytes. Deprecated in favour of Imagick::getImageLength()

Valori restituiti

Returns an int containing the current image size.



Imagick::getImageTicksPerSecond

(PECL imagick 2.0.0)

Imagick::getImageTicksPerSecondGets the image ticks-per-second

Descrizione

int Imagick::getImageTicksPerSecond ( void )

Gets the image ticks-per-second.

Valori restituiti

Returns the image ticks-per-second.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getImageTotalInkDensity

(PECL imagick 2.0.0)

Imagick::getImageTotalInkDensityGets the image total ink density

Descrizione

float Imagick::getImageTotalInkDensity ( void )

Gets the image total ink density.

Valori restituiti

Returns the image total ink density of the image. Throw an ImagickException on error.



Imagick::getImageType

(PECL imagick 0.9.10-0.9.9)

Imagick::getImageTypeGets the potential image type

Descrizione

int Imagick::getImageType ( void )

Gets the potential image type.

Valori restituiti

Returns the potential image type.

  • imagick::IMGTYPE_UNDEFINED
  • imagick::IMGTYPE_BILEVEL
  • imagick::IMGTYPE_GRAYSCALE
  • imagick::IMGTYPE_GRAYSCALEMATTE
  • imagick::IMGTYPE_PALETTE
  • imagick::IMGTYPE_PALETTEMATTE
  • imagick::IMGTYPE_TRUECOLOR
  • imagick::IMGTYPE_TRUECOLORMATTE
  • imagick::IMGTYPE_COLORSEPARATION
  • imagick::IMGTYPE_COLORSEPARATIONMATTE
  • imagick::IMGTYPE_OPTIMIZE

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getImageUnits

(PECL imagick 2.0.0)

Imagick::getImageUnitsGets the image units of resolution

Descrizione

int Imagick::getImageUnits ( void )

Gets the image units of resolution.

Valori restituiti

Returns the image units of resolution.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getImageVirtualPixelMethod

(PECL imagick 2.0.0)

Imagick::getImageVirtualPixelMethodReturns the virtual pixel method

Descrizione

int Imagick::getImageVirtualPixelMethod ( void )

Returns the virtual pixel method for the specified image.

Valori restituiti

Returns the virtual pixel method on success.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getImageWhitePoint

(PECL imagick 2.0.0)

Imagick::getImageWhitePointReturns the chromaticity white point

Descrizione

array Imagick::getImageWhitePoint ( void )

Returns the chromaticity white point as an associative array with the keys "x" and "y".

Valori restituiti

Returns the chromaticity white point as an associative array with the keys "x" and "y".

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getImageWidth

(PECL imagick 2.0.0)

Imagick::getImageWidthReturns the image width

Descrizione

int Imagick::getImageWidth ( void )

Returns the image width.

Valori restituiti

Returns the image width.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getInterlaceScheme

(PECL imagick 2.0.0)

Imagick::getInterlaceSchemeGets the object interlace scheme

Descrizione

int Imagick::getInterlaceScheme ( void )

Gets the object interlace scheme.

Valori restituiti

Gets the wand interlace scheme.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getIteratorIndex

(PECL imagick 2.0.0)

Imagick::getIteratorIndexGets the index of the current active image

Descrizione

int Imagick::getIteratorIndex ( void )

Returns the index of the current active image within the Imagick object. Questo metodo è disponibile se Imagick è stato compilato con ImageMagick versione 6.2.9 o successive.

Valori restituiti

Returns an integer containing the index of the image in the stack.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.

Esempi

Example #1 Using Imagick::getIteratorIndex():

Create images, set and get the iterator index

<?php
$im 
= new Imagick();
$im->newImage(100100, new ImagickPixel("red"));
$im->newImage(100100, new ImagickPixel("green"));
$im->newImage(100100, new ImagickPixel("blue"));

$im->setIteratorIndex(1);
echo 
$im->getIteratorIndex();
?>

Vedere anche:



Imagick::getNumberImages

(PECL imagick 2.0.0)

Imagick::getNumberImagesReturns the number of images in the object

Descrizione

int Imagick::getNumberImages ( void )

Returns the number of images associated with Imagick object.

Valori restituiti

Returns the number of images associated with Imagick object.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getOption

(PECL imagick 2.0.0)

Imagick::getOptionReturns a value associated with the specified key

Descrizione

string Imagick::getOption ( string $key )

Returns a value associated within the object for the specified key.

Elenco dei parametri

key

The name of the option

Valori restituiti

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

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getPackageName

(PECL imagick 2.0.0)

Imagick::getPackageNameReturns the ImageMagick package name

Descrizione

string Imagick::getPackageName ( void )

Returns the ImageMagick package name.

Valori restituiti

Returns the ImageMagick package name as a string.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getPage

(PECL imagick 2.0.0)

Imagick::getPageReturns the page geometry

Descrizione

array Imagick::getPage ( void )

Returns the page geometry associated with the Imagick object in an associative array with the keys "width", "height", "x", and "y".

Valori restituiti

Returns the page geometry associated with the Imagick object in an associative array with the keys "width", "height", "x", and "y", throwing ImagickException on error.



Imagick::getPixelIterator

(PECL imagick 2.0.0)

Imagick::getPixelIteratorReturns a MagickPixelIterator

Descrizione

ImagickPixelIterator Imagick::getPixelIterator ( void )

Returns a MagickPixelIterator.

Valori restituiti

Returns an ImagickPixelIterator on success.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getPixelRegionIterator

(PECL imagick 2.0.0)

Imagick::getPixelRegionIteratorGet an ImagickPixelIterator for an image section

Descrizione

ImagickPixelIterator Imagick::getPixelRegionIterator ( int $x , int $y , int $columns , int $rows )

Get an ImagickPixelIterator for an image section.

Elenco dei parametri

x

The x-coordinate of the region.

y

The y-coordinate of the region.

columns

The width of the region.

rows

The height of the region.

Valori restituiti

Returns an ImagickPixelIterator for an image section.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getPointSize

(No version information available, might only be in Git)

Imagick::getPointSizeGets point size

Descrizione

float Imagick::getPointSize ( void )

Returns the objects point size property. Questo metodo è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.7 o successive.

Valori restituiti

Returns a float containing the point size.

Vedere anche:



Imagick::getQuantumDepth

(PECL imagick 2.0.0)

Imagick::getQuantumDepthGets the quantum depth

Descrizione

array Imagick::getQuantumDepth ( void )

Returns the Imagick quantum depth as a string.

Valori restituiti

Returns the Imagick quantum depth as a string.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getQuantumRange

(PECL imagick 2.0.0)

Imagick::getQuantumRangeReturns the Imagick quantum range

Descrizione

array Imagick::getQuantumRange ( void )

Returns the quantum range for the Imagick instance.

Valori restituiti

Returns an associative array containing the quantum range as an integer ("quantumRangeLong") and as a string ("quantumRangeString").

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getReleaseDate

(PECL imagick 2.0.0)

Imagick::getReleaseDateReturns the ImageMagick release date

Descrizione

string Imagick::getReleaseDate ( void )

Returns the ImageMagick release date as a string.

Valori restituiti

Returns the ImageMagick release date as a string.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getResource

(PECL imagick 2.0.0)

Imagick::getResourceReturns the specified resource's memory usage

Descrizione

int Imagick::getResource ( int $type )

Returns the specified resource's memory usage in megabytes.

Elenco dei parametri

type

Refer to the list of resourcetype constants.

Valori restituiti

Returns the specified resource's memory usage in megabytes.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getResourceLimit

(PECL imagick 2.0.0)

Imagick::getResourceLimitReturns the specified resource limit

Descrizione

int Imagick::getResourceLimit ( int $type )

Returns the specified resource limit.

Elenco dei parametri

type

Refer to the list of resourcetype constants.

Valori restituiti

Returns the specified resource limit in megabytes.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getSamplingFactors

(PECL imagick 2.0.0)

Imagick::getSamplingFactorsGets the horizontal and vertical sampling factor

Descrizione

array Imagick::getSamplingFactors ( void )

Gets the horizontal and vertical sampling factor.

Valori restituiti

Returns an associative array with the horizontal and vertical sampling factors of the image.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getSize

(PECL imagick 2.0.0)

Imagick::getSizeReturns the size associated with the Imagick object

Descrizione

array Imagick::getSize ( void )

Returns the size associated with the Imagick object as an array with the keys "columns" and "rows".

Valori restituiti

Returns the size associated with the Imagick object as an array with the keys "columns" and "rows".



Imagick::getSizeOffset

(PECL imagick 2.0.0)

Imagick::getSizeOffsetReturns the size offset

Descrizione

int Imagick::getSizeOffset ( void )

Returns the size offset associated with the Imagick object. Questo metodo è disponibile se Imagick è stato compilato con ImageMagick versione 6.2.9 o successive.

Valori restituiti

Returns the size offset associated with the Imagick object.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::getVersion

(PECL imagick 2.0.0)

Imagick::getVersionReturns the ImageMagick API version

Descrizione

array Imagick::getVersion ( void )

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

Valori restituiti

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

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::haldClutImage

(No version information available, might only be in Git)

Imagick::haldClutImageReplaces colors in the image

Descrizione

public bool Imagick::haldClutImage ( Imagick $clut [, int $channel = Imagick::CHANNEL_DEFAULT ] )

Replaces colors in the image using a Hald lookup table. Hald images can be created using HALD color coder.

Elenco dei parametri

clut

Imagick object containing the Hald lookup image.

channel

Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Per default è Imagick::CHANNEL_DEFAULT. Fare riferimento a questa lista di costanti di canale

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::hasNextImage

(PECL imagick 2.0.0)

Imagick::hasNextImageChecks if the object has more images

Descrizione

bool Imagick::hasNextImage ( void )

Returns TRUE if the object has more images when traversing the list in the forward direction.

Valori restituiti

Returns TRUE if the object has more images when traversing the list in the forward direction, returns FALSE if there are none.



Imagick::hasPreviousImage

(PECL imagick 2.0.0)

Imagick::hasPreviousImageChecks if the object has a previous image

Descrizione

bool Imagick::hasPreviousImage ( void )

Returns TRUE if the object has more images when traversing the list in the reverse direction

Valori restituiti

Returns TRUE if the object has more images when traversing the list in the reverse direction, returns FALSE if there are none.



Imagick::identifyImage

(PECL imagick 2.0.0)

Imagick::identifyImageIdentifies an image and fetches attributes

Descrizione

array Imagick::identifyImage ([ bool $appendRawOutput = false ] )

Identifies an image and returns the attributes. Attributes include the image width, height, size, and others.

Elenco dei parametri

appendRawOutput

Valori restituiti

Identifies an image and returns the attributes. Attributes include the image width, height, size, and others.

Example #1 Example Result Format

Array
(
    [imageName] => /some/path/image.jpg
    [format] => JPEG (Joint Photographic Experts Group JFIF format)
    [geometry] => Array
        (
            [width] => 90
            [height] => 90
        )

    [type] => TrueColor
    [colorSpace] => RGB
    [resolution] => Array
        (
            [x] => 300
            [y] => 300
        )

    [units] => PixelsPerInch
    [fileSize] => 1.88672kb
    [compression] => JPEG
    [signature] => 9a6dc8f604f97d0d691c0286176ddf992e188f0bebba98494b2146ee2d7118da
)

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::implodeImage

(PECL imagick 2.0.0)

Imagick::implodeImageCreates a new image as a copy

Descrizione

bool Imagick::implodeImage ( float $radius )

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

Elenco dei parametri

radius

The radius of the implode

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::importImagePixels

(No version information available, might only be in Git)

Imagick::importImagePixelsImports image pixels

Descrizione

public bool Imagick::importImagePixels ( int $x , int $y , int $width , int $height , string $map , int $storage , array $pixels )

Imports pixels from an array into an image. The map is usually 'RGB'. This method imposes the following constraints for the parameters: amount of pixels in the array must match width x height x length of the map. Questo metodo è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.5 o successive.

Elenco dei parametri

x

The image x position

y

The image y position

width

The image width

height

The image height

map

Map of pixel ordering as a string. This can be for example RGB. The value 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.

storage

The pixel storage method. Refer to this list of pixel constants.

pixels

The array of pixels

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.

Esempi

Example #1 Imagick::importImagePixels() example

<?php

/* Generate array of pixels. 2000 pixels per color stripe */
$count 2000 3;

$pixels 
   
array_merge(array_pad(array(), $count0),
               
array_pad(array(), $count255), 
               
array_pad(array(), $count0),
               
array_pad(array(), $count255),
               
array_pad(array(), $count0));

/* Width and height. The area is amount of pixels divided
   by three. Three comes from 'RGB', three values per pixel */
$width $height pow((count($pixels) / 3), 0.5);

/* Create empty image */
$im = new Imagick();
$im->newImage($width$height'gray');

/* Import the pixels into image.
   width * height * strlen("RGB") must match count($pixels) */
$im->importImagePixels(00$width$height"RGB"Imagick::PIXEL_CHAR$pixels);

/* output as jpeg image */
$im->setImageFormat('jpg');
header("Content-Type: image/jpg");
echo 
$im;

?>

Il precedente esempio visualizzerà qualcosa simile a:

Output of example : Imagick::importImagePixels()



Imagick::labelImage

(PECL imagick 2.0.0)

Imagick::labelImageAdds a label to an image

Descrizione

bool Imagick::labelImage ( string $label )

Adds a label to an image.

Elenco dei parametri

label

The label to add

Valori restituiti

Restituisce TRUE in caso di successo.



Imagick::levelImage

(PECL imagick 2.0.0)

Imagick::levelImageAdjusts the levels of an image

Descrizione

bool Imagick::levelImage ( float $blackPoint , float $gamma , float $whitePoint [, int $channel = Imagick::CHANNEL_ALL ] )

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.

Elenco dei parametri

blackPoint

The image black point

gamma

The gamma value

whitePoint

The image white point

channel

Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channeltype constants using bitwise operators. Refer to this list of channel constants.

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::linearStretchImage

(PECL imagick 2.0.0)

Imagick::linearStretchImageStretches with saturation the image intensity

Descrizione

bool Imagick::linearStretchImage ( float $blackPoint , float $whitePoint )

Stretches with saturation the image intensity.

Elenco dei parametri

blackPoint

The image black point

whitePoint

The image white point

Valori restituiti

Restituisce TRUE in caso di successo.



Imagick::liquidRescaleImage

(No version information available, might only be in Git)

Imagick::liquidRescaleImageAnimates an image or images

Descrizione

bool Imagick::liquidRescaleImage ( int $width , int $height , float $delta_x , float $rigidity )

This method scales the images using liquid rescaling method. This method is an implementation of a technique called seam carving. In order for this method to work as expected ImageMagick must be compiled with liblqr support. Questo metodo è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.9 o successive.

Elenco dei parametri

width

The width of the target size

height

The height of the target size

delta_x

How much the seam can traverse on x-axis. Passing 0 causes the seams to be straight.

rigidity

Introduces a bias for non-straight seams. This parameter is typically 0.

Valori restituiti

Restituisce TRUE in caso di successo.

Vedere anche:



Imagick::magnifyImage

(PECL imagick 2.0.0)

Imagick::magnifyImageScales an image proportionally 2x

Descrizione

bool Imagick::magnifyImage ( void )

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

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::mapImage

(PECL imagick 2.0.0)

Imagick::mapImageReplaces the colors of an image with the closest color from a reference image.

Descrizione

bool Imagick::mapImage ( Imagick $map , bool $dither )

Elenco dei parametri

map

dither

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::matteFloodfillImage

(PECL imagick 2.0.0)

Imagick::matteFloodfillImageChanges the transparency value of a color

Descrizione

bool Imagick::matteFloodfillImage ( float $alpha , float $fuzz , mixed $bordercolor , int $x , int $y )

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

Elenco dei parametri

alpha

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

fuzz

The fuzz member of image defines how much tolerance is acceptable to consider two colors as the same.

bordercolor

An ImagickPixel object or string representing the border color.

x

The starting x coordinate of the operation.

y

The starting y coordinate of the operation.

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.

Log delle modifiche

Versione Descrizione
2.1.0 Now allows a string representing the color as the third parameter. Previous versions allow only an ImagickPixel object.



Imagick::medianFilterImage

(PECL imagick 2.0.0)

Imagick::medianFilterImageApplies a digital filter

Descrizione

bool Imagick::medianFilterImage ( float $radius )

Applies a digital filter that improves the quality of a noisy image. Each pixel is replaced by the median in a set of neighboring pixels as defined by radius.

Elenco dei parametri

radius

The radius of the pixel neighborhood.

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::mergeImageLayers

(PECL imagick 2.1.0)

Imagick::mergeImageLayersMerges image layers

Descrizione

bool Imagick::mergeImageLayers ( int $layer_method )

Merges image layers into one. This method is useful when working with image formats that use multiple layers such as PSD. The merging is controlled using the layer_method which defines how the layers are merged. Questo metodo è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.7 o successive.

Elenco dei parametri

layer_method

One of the Imagick::LAYERMETHOD_* constants

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.

Vedere anche:



Imagick::minifyImage

(PECL imagick 2.0.0)

Imagick::minifyImageScales an image proportionally to half its size

Descrizione

bool Imagick::minifyImage ( void )

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

Valori restituiti

Restituisce TRUE in caso di successo.



Imagick::modulateImage

(PECL imagick 2.0.0)

Imagick::modulateImageControl the brightness, saturation, and hue

Descrizione

bool Imagick::modulateImage ( float $brightness , float $saturation , float $hue )

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.

Elenco dei parametri

brightness

saturation

hue

Valori restituiti

Restituisce TRUE in caso di successo.



Imagick::montageImage

(PECL imagick 2.0.0)

Imagick::montageImageCreates a composite image

Descrizione

Imagick Imagick::montageImage ( ImagickDraw $draw , string $tile_geometry , string $thumbnail_geometry , int $mode , string $frame )

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.

Elenco dei parametri

draw

The font name, size, and color are obtained from this object.

tile_geometry

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

thumbnail_geometry

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

mode

Thumbnail framing mode, see Montage Mode constants.

frame

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

Valori restituiti

Restituisce TRUE in caso di successo.



Imagick::morphImages

(PECL imagick 2.0.0)

Imagick::morphImagesMethod morphs a set of images

Descrizione

Imagick Imagick::morphImages ( int $number_frames )

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.

Elenco dei parametri

number_frames

The number of in-between images to generate.

Valori restituiti

This method returns a new Imagick object on success. Throw an ImagickException on error.



Imagick::mosaicImages

(PECL imagick 2.0.0)

Imagick::mosaicImagesForms a mosaic from images

Descrizione

Imagick Imagick::mosaicImages ( void )

Inlays an image sequence to form a single coherent picture. It returns a wand with each image in the sequence composited at the location defined by the page offset of the image.

Valori restituiti

Restituisce TRUE in caso di successo.



Imagick::motionBlurImage

(PECL imagick 2.0.0)

Imagick::motionBlurImageSimulates motion blur

Descrizione

bool Imagick::motionBlurImage ( float $radius , float $sigma , float $angle [, int $channel = Imagick::CHANNEL_DEFAULT ] )

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.

Elenco dei parametri

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.

channel

Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channeltype constants using bitwise operators. Refer to this list of channel constants. The channel argument affects only if Imagick is compiled against ImageMagick version 6.4.4 or greater.

Valori restituiti

Restituisce TRUE in caso di successo.



Imagick::negateImage

(PECL imagick 2.0.0)

Imagick::negateImageNegates the colors in the reference image

Descrizione

bool Imagick::negateImage ( bool $gray [, int $channel = Imagick::CHANNEL_ALL ] )

Negates the colors in the reference image. The Grayscale option means that only grayscale values within the image are negated.

Elenco dei parametri

gray

Whether to only negate grayscale pixels within the image.

channel

Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channeltype constants using bitwise operators. Refer to this list of channel constants.

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::newImage

(PECL imagick 2.0.0)

Imagick::newImageCreates a new image

Descrizione

bool Imagick::newImage ( int $cols , int $rows , mixed $background [, string $format ] )

Creates a new image and associates ImagickPixel value as background color

Elenco dei parametri

cols

Columns in the new image

rows

Rows in the new image

background

The background color used for this image

format

Image format. This parameter was added in Imagick version 2.0.1.

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.

Log delle modifiche

Versione Descrizione
2.1.0 Now allows a string representing the color as the third parameter. Previous versions allow only an ImagickPixel object.

Esempi

Example #1 Using Imagick::newImage():

Create a new image and display it.

<?php

$image 
= new Imagick();
$image->newImage(100100, new ImagickPixel('red'));
$image->setImageFormat('png');

header('Content-type: image/png');
echo 
$image;

?>



Imagick::newPseudoImage

(PECL imagick 2.0.0)

Imagick::newPseudoImageCreates a new image

Descrizione

bool Imagick::newPseudoImage ( int $columns , int $rows , string $pseudoString )

Creates a new image using ImageMagick pseudo-formats.

Elenco dei parametri

columns

columns in the new image

rows

rows in the new image

pseudoString

string containing pseudo image definition.

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::nextImage

(PECL imagick 2.0.0)

Imagick::nextImageMoves to the next image

Descrizione

bool Imagick::nextImage ( void )

Associates the next image in the image list with an Imagick object.

Valori restituiti

Restituisce TRUE in caso di successo.



Imagick::normalizeImage

(PECL imagick 2.0.0)

Imagick::normalizeImageEnhances the contrast of a color image

Descrizione

bool Imagick::normalizeImage ([ int $channel = Imagick::CHANNEL_ALL ] )

Enhances the contrast of a color image by adjusting the pixels color to span the entire range of colors available.

Elenco dei parametri

channel

Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channeltype constants using bitwise operators. Refer to this list of channel constants.

Valori restituiti

Restituisce TRUE in caso di successo.



Imagick::oilPaintImage

(PECL imagick 2.0.0)

Imagick::oilPaintImageSimulates an oil painting

Descrizione

bool Imagick::oilPaintImage ( float $radius )

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.

Elenco dei parametri

radius

The radius of the circular neighborhood.

Valori restituiti

Restituisce TRUE in caso di successo.



Imagick::opaquePaintImage

(No version information available, might only be in Git)

Imagick::opaquePaintImageChanges the color value of any pixel that matches target

Descrizione

bool Imagick::opaquePaintImage ( mixed $target , mixed $fill , float $fuzz , bool $invert [, int $channel = Imagick::CHANNEL_DEFAULT ] )

Changes any pixel that matches color with the color defined by fill. Questo metodo è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.8 o successive.

Elenco dei parametri

target

ImagickPixel object or a string containing the color to change

fill

The replacement color

fuzz

The amount of fuzz. For example, set fuzz to 10 and the color red at intensities of 100 and 102 respectively are now interpreted as the same color.

invert

If TRUE paints any pixel that does not match the target color.

channel

Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Per default è Imagick::CHANNEL_DEFAULT. Fare riferimento a questa lista di costanti di canale

Valori restituiti

Restituisce TRUE in caso di successo.



Imagick::optimizeImageLayers

(PECL imagick 2.0.0)

Imagick::optimizeImageLayersRemoves repeated portions of images to optimize

Descrizione

bool Imagick::optimizeImageLayers ( void )

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. Questo metodo è disponibile se Imagick è stato compilato con ImageMagick versione 6.2.9 o successive.

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.

Esempi

Example #1 Using Imagick::optimizeImageLayers()

Reading, optimizing and writing a GIF image

<?php
/* create new imagick object */
$im = new Imagick("test.gif");

/* optimize the image layers */
$im->optimizeImageLayers();

/* write the image back */
$im->writeImages("test_optimized.gif"true);
?>

Vedere anche:



Imagick::orderedPosterizeImage

(PECL imagick 2.2.2)

Imagick::orderedPosterizeImagePerforms an ordered dither

Descrizione

bool Imagick::orderedPosterizeImage ( string $threshold_map [, int $channel = Imagick::CHANNEL_ALL ] )

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. Questo metodo è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.1 o successive.

Elenco dei parametri

threshold_map

A string containing the name of the threshold dither map to use

channel

Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channeltype constants using bitwise operators. Refer to this list of channel constants.

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::paintFloodfillImage

(PECL imagick 2.1.0)

Imagick::paintFloodfillImageChanges the color value of any pixel that matches target

Descrizione

bool Imagick::paintFloodfillImage ( mixed $fill , float $fuzz , mixed $bordercolor , int $x , int $y [, int $channel = Imagick::CHANNEL_ALL ] )

Changes the color value of any pixel that matches target and is an immediate neighbor. As of ImageMagick 6.3.8 this method has been deprecated and Imagick::floodfillPaintImage() should be used instead.

Elenco dei parametri

fill

ImagickPixel object or a string containing the fill color

fuzz

The amount of fuzz. 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

ImagickPixel object or a string containing the border color

x

X start position of the floodfill

y

Y start position of the floodfill

channel

Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Per default è Imagick::CHANNEL_DEFAULT. Fare riferimento a questa lista di costanti di canale

Valori restituiti

Restituisce TRUE in caso di successo.



Imagick::paintOpaqueImage

(PECL imagick 2.0.0)

Imagick::paintOpaqueImageChange any pixel that matches color

Descrizione

bool Imagick::paintOpaqueImage ( mixed $target , mixed $fill , float $fuzz [, int $channel = Imagick::CHANNEL_ALL ] )

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

Elenco dei parametri

target

Change this target color to the fill color within the image. An ImagickPixel object or a string representing the target color.

fill

An ImagickPixel object or a string representing the fill color.

fuzz

The fuzz member of image defines how much tolerance is acceptable to consider two colors as the same.

channel

Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channeltype constants using bitwise operators. Refer to this list of channel constants.

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.

Log delle modifiche

Versione Descrizione
2.1.0 Now allows a string representing the color as first and second parameter. Previous versions allow only an ImagickPixel object.



Imagick::paintTransparentImage

(PECL imagick 2.0.0)

Imagick::paintTransparentImageChanges any pixel that matches color with the color defined by fill

Descrizione

bool Imagick::paintTransparentImage ( mixed $target , float $alpha , float $fuzz )

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

Elenco dei parametri

target

Change this target color to specified opacity value within the image.

alpha

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

fuzz

The fuzz member of image defines how much tolerance is acceptable to consider two colors as the same.

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.

Log delle modifiche

Versione Descrizione
2.1.0 Now allows a string representing the color as the first parameter. Previous versions allow only an ImagickPixel object.



Imagick::pingImage

(PECL imagick 2.0.0)

Imagick::pingImageFetch basic attributes about the image

Descrizione

bool Imagick::pingImage ( string $filename )

This method can be used to query image width, height, size, and format without reading the whole image in to memory.

Elenco dei parametri

filename

The filename to read the information from.

Valori restituiti

Restituisce TRUE in caso di successo.



Imagick::pingImageBlob

(PECL imagick 2.0.0)

Imagick::pingImageBlobQuickly fetch attributes

Descrizione

bool Imagick::pingImageBlob ( string $image )

This method can be used to query image width, height, size, and format without reading the whole image to memory. Questo metodo è disponibile se Imagick è stato compilato con ImageMagick versione 6.2.9 o successive.

Elenco dei parametri

image

A string containing the image.

Valori restituiti

Restituisce TRUE in caso di successo.

Esempi

Example #1 Using Imagick::pingImageBlob()

Pinging an image from a string

<?php
/* read image contents */
$image file_get_contents("test.jpg");

/* create new imagick object */
$im = new Imagick();

/* pass the string to the imagick object */
$im->pingImageBlob($image);

/* output image width and height */
echo $im->getImageWidth() . 'x' $im->getImageHeight();
?>

Vedere anche:



Imagick::pingImageFile

(PECL imagick 2.0.0)

Imagick::pingImageFileGet basic image attributes in a lightweight manner

Descrizione

bool Imagick::pingImageFile ( resource $filehandle [, string $fileName ] )

This method can be used to query image width, height, size, and format without reading the whole image to memory. Questo metodo è disponibile se Imagick è stato compilato con ImageMagick versione 6.2.9 o successive.

Elenco dei parametri

filehandle

An open filehandle to the image.

fileName

Optional filename for this image.

Valori restituiti

Restituisce TRUE in caso di successo.

Esempi

Example #1 Using Imagick::pingImageFile()

Opening a remote location

<?php
/* fopen a remote location */
$fp fopen("http://example.com/test.jpg");

/* create new imagick object */
$im = new Imagick();

/* pass the handle to imagick */
$im->pingImageFile($fp);
?>

Vedere anche:



Imagick::polaroidImage

(PECL imagick 2.0.0)

Imagick::polaroidImageSimulates a Polaroid picture

Descrizione

bool Imagick::polaroidImage ( ImagickDraw $properties , float $angle )

Simulates a Polaroid picture. Questo metodo è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.2 o successive.

Elenco dei parametri

properties

The polaroid properties

angle

The polaroid angle

Valori restituiti

Restituisce TRUE in caso di successo.

Esempi

Example #1 A Imagick::polaroidImage() example

An example of using Imagick::polaroidImage()

<?php
/* Create the object */
$image = new Imagick('source.png');

/* Set the opacity */
$image->polaroidImage(new ImagickDraw(), 25);

/* output the image */
header('Content-type: image/png');
echo 
$image;

?>



Imagick::posterizeImage

(PECL imagick 2.0.0)

Imagick::posterizeImageReduces the image to a limited number of color level

Descrizione

bool Imagick::posterizeImage ( int $levels , bool $dither )

Reduces the image to a limited number of color level.

Elenco dei parametri

levels

dither

Valori restituiti

Restituisce TRUE in caso di successo.



Imagick::previewImages

(PECL imagick 2.0.0)

Imagick::previewImagesQuickly pin-point appropriate parameters for image processing

Descrizione

bool Imagick::previewImages ( int $preview )

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

Elenco dei parametri

preview

Preview type. See Preview type constants

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::previousImage

(PECL imagick 2.0.0)

Imagick::previousImageMove to the previous image in the object

Descrizione

bool Imagick::previousImage ( void )

Assocates the previous image in an image list with the Imagick object.

Valori restituiti

Restituisce TRUE in caso di successo.



Imagick::profileImage

(PECL imagick 2.0.0)

Imagick::profileImageAdds or removes a profile from an image

Descrizione

bool Imagick::profileImage ( string $name , string $profile )

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

Elenco dei parametri

name

profile

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::quantizeImage

(PECL imagick 2.0.0)

Imagick::quantizeImageAnalyzes the colors within a reference image

Descrizione

bool Imagick::quantizeImage ( int $numberColors , int $colorspace , int $treedepth , bool $dither , bool $measureError )

Elenco dei parametri

numberColors

colorspace

treedepth

dither

measureError

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::quantizeImages

(PECL imagick 2.0.0)

Imagick::quantizeImagesAnalyzes the colors within a sequence of images

Descrizione

bool Imagick::quantizeImages ( int $numberColors , int $colorspace , int $treedepth , bool $dither , bool $measureError )

Elenco dei parametri

numberColors

colorspace

treedepth

dither

measureError

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::queryFontMetrics

(PECL imagick 2.0.0)

Imagick::queryFontMetricsReturns an array representing the font metrics

Descrizione

array Imagick::queryFontMetrics ( ImagickDraw $properties , string $text [, bool $multiline ] )

Returns a multi-dimensional array representing the font metrics.

Elenco dei parametri

properties

ImagickDraw object containing font properties

text

The text

multiline

Multiline parameter. If left empty it is autodetected

Valori restituiti

Returns a multi-dimensional array representing the font metrics.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.

Esempi

Example #1 Using Imagick::queryFontMetrics():

Query the metrics for the text and dump the results on the screen.

<?php
/* Create a new Imagick object */
$im = new Imagick();

/* Create an ImagickDraw object */
$draw = new ImagickDraw();

/* Set the font */
$draw->setFont('/path/to/font.ttf');

/* Dump the font metrics, autodetect multiline */
var_dump($im->queryFontMetrics($draw"Hello World!"));
?>



Imagick::queryFonts

(PECL imagick 2.0.0)

Imagick::queryFontsReturns the configured fonts

Descrizione

array Imagick::queryFonts ([ string $pattern = "*" ] )

Returns the configured fonts.

Elenco dei parametri

pattern

The query pattern

Valori restituiti

Returns an array containing the configured fonts.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::queryFormats

(PECL imagick 2.0.0)

Imagick::queryFormatsReturns formats supported by Imagick

Descrizione

array Imagick::queryFormats ([ string $pattern = "*" ] )

Returns formats supported by Imagick.

Elenco dei parametri

pattern

Valori restituiti

Returns an array containing the formats supported by Imagick.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::radialBlurImage

(PECL imagick 2.0.0)

Imagick::radialBlurImageRadial blurs an image

Descrizione

bool Imagick::radialBlurImage ( float $angle [, int $channel = Imagick::CHANNEL_ALL ] )

Radial blurs an image.

Elenco dei parametri

angle

channel

Valori restituiti

Restituisce TRUE in caso di successo.



Imagick::raiseImage

(PECL imagick 2.0.0)

Imagick::raiseImageCreates a simulated 3d button-like effect

Descrizione

bool Imagick::raiseImage ( int $width , int $height , int $x , int $y , bool $raise )

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.

Elenco dei parametri

width

height

x

y

raise

Valori restituiti

Restituisce TRUE in caso di successo.



Imagick::randomThresholdImage

(PECL imagick 2.0.0)

Imagick::randomThresholdImageCreates a high-contrast, two-color image

Descrizione

bool Imagick::randomThresholdImage ( float $low , float $high [, int $channel = Imagick::CHANNEL_ALL ] )

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. Questo metodo è disponibile se Imagick è stato compilato con ImageMagick versione 6.2.9 o successive.

Elenco dei parametri

low

The low point

high

The high point

channel

Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channeltype constants using bitwise operators. Refer to this list of channel constants.

Valori restituiti

Restituisce TRUE in caso di successo.



Imagick::readImage

(PECL imagick 0.9.0-0.9.9)

Imagick::readImageReads image from filename

Descrizione

bool Imagick::readImage ( string $filename )

Reads image from filename

Elenco dei parametri

filename

Valori restituiti

Restituisce TRUE in caso di successo.



Imagick::readImageBlob

(PECL imagick 2.0.0)

Imagick::readImageBlobReads image from a binary string

Descrizione

bool Imagick::readImageBlob ( string $image [, string $filename ] )

Reads image from a binary string

Elenco dei parametri

image

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::readImageFile

(PECL imagick 2.0.0)

Imagick::readImageFileReads image from open filehandle

Descrizione

bool Imagick::readImageFile ( resource $filehandle [, string $fileName = null ] )

Reads image from open filehandle

Elenco dei parametri

filehandle

fileName

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::recolorImage

(No version information available, might only be in Git)

Imagick::recolorImageRecolors image

Descrizione

bool Imagick::recolorImage ( array $matrix )

Translate, scale, shear, or rotate image colors. This method supports variable sized matrices but normally 5x5 matrix is used for RGBA and 6x6 is used for CMYK. The last row should contain the normalized values. Questo metodo è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.6 o successive.

Elenco dei parametri

matrix

The matrix containing the color values

Valori restituiti

Restituisce TRUE in caso di successo.

Vedere anche:



Imagick::reduceNoiseImage

(PECL imagick 2.0.0)

Imagick::reduceNoiseImageSmooths the contours of an image

Descrizione

bool Imagick::reduceNoiseImage ( float $radius )

Smooths the contours of an image while still preserving edge information. The algorithm works by replacing each pixel with its neighbor closest in value. A neighbor is defined by radius. Use a radius of 0 and Imagick::reduceNoiseImage() selects a suitable radius for you.

Elenco dei parametri

radius

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::remapImage

(No version information available, might only be in Git)

Imagick::remapImageRemaps image colors

Descrizione

public bool Imagick::remapImage ( Imagick $replacement , int $DITHER )

Replaces colors an image with those defined by replacement. The colors are replaced with the closest possible color. Questo metodo è disponibile se Imagick è stato compilato con ImageMagick versione 6.4.5 o successive.

Elenco dei parametri

replacement

An Imagick object containing the replacement colors

DITHER

Refer to this list of dither method constants

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::removeImage

(PECL imagick 2.0.0)

Imagick::removeImageRemoves an image from the image list

Descrizione

bool Imagick::removeImage ( void )

Removes an image from the image list.

Valori restituiti

Restituisce TRUE in caso di successo.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::removeImageProfile

(PECL imagick 2.0.0)

Imagick::removeImageProfileRemoves the named image profile and returns it

Descrizione

string Imagick::removeImageProfile ( string $name )

Removes the named image profile and returns it.

Elenco dei parametri

name

Valori restituiti

Returns a string containing the profile of the image.

Errori/Eccezioni

Lancia una ImagickException in caso di errore.



Imagick::render

(PECL imagick 2.0.0)

Imagick::renderRenders all preceding drawing commands

Descrizione

bool Imagick::render ( void )

Renders all preceding drawing commands.

Valori restituiti

Restituisce TRUE in caso di successo.



Imagick::resampleImage

(PECL imagick 2.0.0)

Imagick::resampleImageResample image to desired resolution

Descrizione

bool Imagick::resampleImage ( float $x_resolution , float $y_resolution , int $filter , float $blur )

Resample image to desired resolution.

Elenco dei parametri

x_resolution

y_resolution

filter

blur

Valori restituiti

Restituisce TRUE in caso di successo.



Imagick::resetImagePage

(No version information available, might only be in Git)

Imagick::resetImagePageReset image page

Descrizione

bool Imagick::resetImagePage ( string $page )

The page definition as a string. The string is in format WxH+x+y. Questo metodo è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.6 o successive.

Elenco dei parametri

page