PHP 클래스 Pop\Image\Imagick

저자: Nick Sagona, III ([email protected])
상속: extends Pop\Image\AbstractRasterImage
파일 보기 프로젝트 열기: nicksagona/PopPHP 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$allowed array Array of allowed file types.
$blur integer Image blur
$compression integer | string Image compression
$filter integer Image filter
$opacity float Image color opacity
$overlay integer Image overlay

공개 메소드들

메소드 설명
__construct ( string $img, integer | string $w = null, integer | string $h = null, Pop\Color\Space\ColorInterface $color = null, array $types = null ) : Imagick Constructor
__destruct ( ) : void Destructor to destroy the image resource
__toString ( ) : string To string method to output the image
blur ( integer $radius, integer $sigma, integer $angle, integer $type = Imagick::BLUR ) : Imagick Method to blur the image.
border ( integer $w, integer $h = null, integer $type = Imagick::INNER_BORDER ) : Imagick Method to add a border to the image.
brightness ( integer $b ) : Imagick Method to adjust the brightness of the image.
colorTotal ( ) : integer Return the number of colors in the palette of indexed images.
colorize ( Pop\Color\Space\ColorInterface $color ) : Imagick Method to colorize the image with the color passed.
contrast ( integer $amount ) : Imagick Method to adjust the contrast of the image.
convert ( string $type ) : Imagick Convert the image object to the new specified image type.
crop ( integer | string $wid, integer | string $hgt, integer | string $x, integer | string $y ) : mixed Crop the image object to a image
cropThumb ( integer | string $px, integer | string $x, integer | string $y ) : Imagick Crop the image object to a square image
desaturate ( ) : Imagick Method to desaturate of the image.
destroy ( boolean $file = false ) : void Destroy the image object and the related image file directly.
diffuse ( integer $radius ) : Imagick Apply a diffusion effect to the image
drawArc ( integer $x, integer $y, integer $start, integer $end, integer $w, integer $h = null ) : Imagick Method to add an arc to the image.
drawCircle ( integer $x, integer $y, integer $w ) : Imagick Method to add a circle to the image.
drawEllipse ( integer $x, integer $y, integer $w, integer $h = null ) : Imagick Method to add an ellipse to the image.
drawLine ( integer $x1, integer $y1, integer $x2, integer $y2 ) : Imagick Method to add a line to the image.
drawPolygon ( array $points ) : Imagick Method to add a polygon to the image.
drawRectangle ( integer $x, integer $y, integer $w, integer $h = null ) : Imagick Method to add a rectangle to the image.
drawSquare ( integer $x, integer $y, integer $w ) : Imagick Method to add a square to the image.
flatten ( ) : Imagick Flatten the image layers
flip ( ) : Imagick Method to flip the image over the x-axis.
flop ( ) : Imagick Method to flip the image over the y-axis.
formats ( ) : array Get formats
getColors ( integer | string $format = Pop\Image\Imagick::HEX ) : array Return all of the colors in the palette in an array format
getFormats ( ) : array Get the array of supported formats of Imagick.
getNumberOfFormats ( ) : integer Get the number of supported formats of Imagick.
hsb ( integer $h, integer $s, integer $b ) : Imagick Method to adjust the HSB of the image altogether.
hue ( integer $h ) : Imagick Method to adjust the hue of the image.
invert ( ) : Imagick Method to invert the image (create a negative.)
isInstalled ( ) : boolean Check if Imagick is installed.
level ( integer $black, float $gamma, integer $white ) : Imagick Method to adjust the levels of the image using a 0 - 255 range.
noise ( integer $type = Imagick::NOISE_MULTIPLICATIVEGAUSSIAN ) : Imagick Apply a noise effect to the image
output ( boolean $download = false ) : Imagick Output the image object directly.
overlay ( string $ovr, integer | string $x, integer | string $y ) : Imagick Overlay an image onto the current image.
paint ( integer $radius ) : Imagick Apply an oil paint effect to the image using the pixel radius threshold
pencil ( integer $radius, integer $sigma, integer $angle ) : Imagick Apply a pencil/sketch effect to the image
pixelate ( integer $w, integer $h = null ) : Imagick Apply a mosiac pixelate effect to the image
posterize ( integer $levels, boolean $dither = false ) : Imagick Apply a posterize effect to the image
resize ( integer | string $px ) : Imagick Resize the image object to the largest dimension
resizeToHeight ( integer | string $hgt ) : mixed Resize the image object to the height parameter passed.
resizeToWidth ( integer | string $wid ) : mixed Resize the image object to the width parameter passed.
resource ( ) : Imagick Get the image resource to directly interact with it
rotate ( integer | string $deg ) : Imagick Rotate the image object, using simple degrees, i.e. -90, to rotate the image.
saturation ( integer $s ) : Imagick Method to adjust the saturation of the image.
save ( string $to = null, boolean $append = false ) : Imagick Save the image object to disk.
scale ( float | string $scl ) : Imagick Scale the image object
setBlur ( integer | string $blur = null ) : Imagick Set the image blur.
setCompression ( integer $comp = null ) : Imagick Set the image compression quality with an Imagick compression constant
setFilter ( integer | string $filter = null ) : Imagick Set the image filter.
setFormats ( ) : Imagick Set the current object formats to include the supported formats of Imagick.
setOpacity ( float $opac ) : Imagick Set the opacity.
setOverlay ( integer | string $ovr = null ) : Imagick Set the image overlay.
setQuality ( integer $q = null ) : Imagick Set the image quality.
sharpen ( integer $radius, integer $sigma ) : Imagick Method to sharpen the image.
skew ( Pop\Color\Space\ColorInterface $color, integer $x, integer $y ) : Imagick Apply a skew effect to the image
swirl ( integer $degrees ) : Imagick Apply a swirl effect to the image
text ( string $str, integer | string $size, integer | string $x, integer | string $y, string $font = null, integer | string $rotate = null, boolean $stroke = false ) : Imagick Create text within the an image object
wave ( integer $amp, integer $length ) : Imagick Apply a wave effect to the image

보호된 메소드들

메소드 설명
getInfo ( ) : void Get Imagick Info.
setColor ( Pop\Color\Space\ColorInterface $color = null ) : mixed Set and return a color identifier.
setImageInfo ( ) : void Set the image info

메소드 상세

__construct() 공개 메소드

Instantiate an Imagick file object based on either a pre-existing image file on disk, or a new image file. As of July 28th, 2011, stable testing was successful with the following versions of the required software: ImageMagick 6.5.* Ghostscript 8.70 or 8.71 Imagick PHP Extension 3.0.1 Any variation in the versions of the required software may contribute to the Pop\Image\Imagick component not functioning properly.
public __construct ( string $img, integer | string $w = null, integer | string $h = null, Pop\Color\Space\ColorInterface $color = null, array $types = null ) : Imagick
$img string
$w integer | string
$h integer | string
$color Pop\Color\Space\ColorInterface
$types array
리턴 Imagick

__destruct() 공개 메소드

Destructor to destroy the image resource
public __destruct ( ) : void
리턴 void

__toString() 공개 메소드

To string method to output the image
public __toString ( ) : string
리턴 string

blur() 공개 메소드

Method to blur the image.
public blur ( integer $radius, integer $sigma, integer $angle, integer $type = Imagick::BLUR ) : Imagick
$radius integer
$sigma integer
$angle integer
$type integer
리턴 Imagick

border() 공개 메소드

Method to add a border to the image.
public border ( integer $w, integer $h = null, integer $type = Imagick::INNER_BORDER ) : Imagick
$w integer
$h integer
$type integer
리턴 Imagick

brightness() 공개 메소드

Method to adjust the brightness of the image.
public brightness ( integer $b ) : Imagick
$b integer
리턴 Imagick

colorTotal() 공개 메소드

Return the number of colors in the palette of indexed images.
public colorTotal ( ) : integer
리턴 integer

colorize() 공개 메소드

Method to colorize the image with the color passed.
public colorize ( Pop\Color\Space\ColorInterface $color ) : Imagick
$color Pop\Color\Space\ColorInterface
리턴 Imagick

contrast() 공개 메소드

Method to adjust the contrast of the image.
public contrast ( integer $amount ) : Imagick
$amount integer
리턴 Imagick

convert() 공개 메소드

Convert the image object to the new specified image type.
public convert ( string $type ) : Imagick
$type string
리턴 Imagick

crop() 공개 메소드

Crop the image object to a image
public crop ( integer | string $wid, integer | string $hgt, integer | string $x, integer | string $y ) : mixed
$wid integer | string
$hgt integer | string
$x integer | string
$y integer | string
리턴 mixed

cropThumb() 공개 메소드

Crop the image object to a square image
public cropThumb ( integer | string $px, integer | string $x, integer | string $y ) : Imagick
$px integer | string
$x integer | string
$y integer | string
리턴 Imagick

desaturate() 공개 메소드

Method to desaturate of the image.
public desaturate ( ) : Imagick
리턴 Imagick

destroy() 공개 메소드

Destroy the image object and the related image file directly.
public destroy ( boolean $file = false ) : void
$file boolean
리턴 void

diffuse() 공개 메소드

Apply a diffusion effect to the image
public diffuse ( integer $radius ) : Imagick
$radius integer
리턴 Imagick

drawArc() 공개 메소드

Method to add an arc to the image.
public drawArc ( integer $x, integer $y, integer $start, integer $end, integer $w, integer $h = null ) : Imagick
$x integer
$y integer
$start integer
$end integer
$w integer
$h integer
리턴 Imagick

drawCircle() 공개 메소드

Method to add a circle to the image.
public drawCircle ( integer $x, integer $y, integer $w ) : Imagick
$x integer
$y integer
$w integer
리턴 Imagick

drawEllipse() 공개 메소드

Method to add an ellipse to the image.
public drawEllipse ( integer $x, integer $y, integer $w, integer $h = null ) : Imagick
$x integer
$y integer
$w integer
$h integer
리턴 Imagick

drawLine() 공개 메소드

Method to add a line to the image.
public drawLine ( integer $x1, integer $y1, integer $x2, integer $y2 ) : Imagick
$x1 integer
$y1 integer
$x2 integer
$y2 integer
리턴 Imagick

drawPolygon() 공개 메소드

Method to add a polygon to the image.
public drawPolygon ( array $points ) : Imagick
$points array
리턴 Imagick

drawRectangle() 공개 메소드

Method to add a rectangle to the image.
public drawRectangle ( integer $x, integer $y, integer $w, integer $h = null ) : Imagick
$x integer
$y integer
$w integer
$h integer
리턴 Imagick

drawSquare() 공개 메소드

Method to add a square to the image.
public drawSquare ( integer $x, integer $y, integer $w ) : Imagick
$x integer
$y integer
$w integer
리턴 Imagick

flatten() 공개 메소드

Flatten the image layers
public flatten ( ) : Imagick
리턴 Imagick

flip() 공개 메소드

Method to flip the image over the x-axis.
public flip ( ) : Imagick
리턴 Imagick

flop() 공개 메소드

Method to flip the image over the y-axis.
public flop ( ) : Imagick
리턴 Imagick

formats() 공개 정적인 메소드

Get formats
public static formats ( ) : array
리턴 array

getColors() 공개 메소드

Return all of the colors in the palette in an array format
public getColors ( integer | string $format = Pop\Image\Imagick::HEX ) : array
$format integer | string
리턴 array

getFormats() 공개 메소드

Get the array of supported formats of Imagick.
public getFormats ( ) : array
리턴 array

getInfo() 보호된 메소드

Get Imagick Info.
protected getInfo ( ) : void
리턴 void

getNumberOfFormats() 공개 메소드

Get the number of supported formats of Imagick.
public getNumberOfFormats ( ) : integer
리턴 integer

hsb() 공개 메소드

Method to adjust the HSB of the image altogether.
public hsb ( integer $h, integer $s, integer $b ) : Imagick
$h integer
$s integer
$b integer
리턴 Imagick

hue() 공개 메소드

Method to adjust the hue of the image.
public hue ( integer $h ) : Imagick
$h integer
리턴 Imagick

invert() 공개 메소드

Method to invert the image (create a negative.)
public invert ( ) : Imagick
리턴 Imagick

isInstalled() 공개 정적인 메소드

Check if Imagick is installed.
public static isInstalled ( ) : boolean
리턴 boolean

level() 공개 메소드

Method to adjust the levels of the image using a 0 - 255 range.
public level ( integer $black, float $gamma, integer $white ) : Imagick
$black integer
$gamma float
$white integer
리턴 Imagick

noise() 공개 메소드

Apply a noise effect to the image
public noise ( integer $type = Imagick::NOISE_MULTIPLICATIVEGAUSSIAN ) : Imagick
$type integer
리턴 Imagick

output() 공개 메소드

Output the image object directly.
public output ( boolean $download = false ) : Imagick
$download boolean
리턴 Imagick

overlay() 공개 메소드

Overlay an image onto the current image.
public overlay ( string $ovr, integer | string $x, integer | string $y ) : Imagick
$ovr string
$x integer | string
$y integer | string
리턴 Imagick

paint() 공개 메소드

Apply an oil paint effect to the image using the pixel radius threshold
public paint ( integer $radius ) : Imagick
$radius integer
리턴 Imagick

pencil() 공개 메소드

Apply a pencil/sketch effect to the image
public pencil ( integer $radius, integer $sigma, integer $angle ) : Imagick
$radius integer
$sigma integer
$angle integer
리턴 Imagick

pixelate() 공개 메소드

Apply a mosiac pixelate effect to the image
public pixelate ( integer $w, integer $h = null ) : Imagick
$w integer
$h integer
리턴 Imagick

posterize() 공개 메소드

Apply a posterize effect to the image
public posterize ( integer $levels, boolean $dither = false ) : Imagick
$levels integer
$dither boolean
리턴 Imagick

resize() 공개 메소드

Resize the image object to the largest dimension
public resize ( integer | string $px ) : Imagick
$px integer | string
리턴 Imagick

resizeToHeight() 공개 메소드

Resize the image object to the height parameter passed.
public resizeToHeight ( integer | string $hgt ) : mixed
$hgt integer | string
리턴 mixed

resizeToWidth() 공개 메소드

Resize the image object to the width parameter passed.
public resizeToWidth ( integer | string $wid ) : mixed
$wid integer | string
리턴 mixed

resource() 공개 메소드

Get the image resource to directly interact with it
public resource ( ) : Imagick
리턴 Imagick

rotate() 공개 메소드

Rotate the image object, using simple degrees, i.e. -90, to rotate the image.
public rotate ( integer | string $deg ) : Imagick
$deg integer | string
리턴 Imagick

saturation() 공개 메소드

Method to adjust the saturation of the image.
public saturation ( integer $s ) : Imagick
$s integer
리턴 Imagick

save() 공개 메소드

Save the image object to disk.
public save ( string $to = null, boolean $append = false ) : Imagick
$to string
$append boolean
리턴 Imagick

scale() 공개 메소드

Scale the image object
public scale ( float | string $scl ) : Imagick
$scl float | string
리턴 Imagick

setBlur() 공개 메소드

Set the image blur.
public setBlur ( integer | string $blur = null ) : Imagick
$blur integer | string
리턴 Imagick

setColor() 보호된 메소드

Set and return a color identifier.
protected setColor ( Pop\Color\Space\ColorInterface $color = null ) : mixed
$color Pop\Color\Space\ColorInterface
리턴 mixed

setCompression() 공개 메소드

Set the image compression quality with an Imagick compression constant
public setCompression ( integer $comp = null ) : Imagick
$comp integer
리턴 Imagick

setFilter() 공개 메소드

Set the image filter.
public setFilter ( integer | string $filter = null ) : Imagick
$filter integer | string
리턴 Imagick

setFormats() 공개 메소드

Set the current object formats to include the supported formats of Imagick.
public setFormats ( ) : Imagick
리턴 Imagick

setImageInfo() 보호된 메소드

Set the image info
protected setImageInfo ( ) : void
리턴 void

setOpacity() 공개 메소드

Set the opacity.
public setOpacity ( float $opac ) : Imagick
$opac float
리턴 Imagick

setOverlay() 공개 메소드

Set the image overlay.
public setOverlay ( integer | string $ovr = null ) : Imagick
$ovr integer | string
리턴 Imagick

setQuality() 공개 메소드

Set the image quality.
public setQuality ( integer $q = null ) : Imagick
$q integer
리턴 Imagick

sharpen() 공개 메소드

Method to sharpen the image.
public sharpen ( integer $radius, integer $sigma ) : Imagick
$radius integer
$sigma integer
리턴 Imagick

skew() 공개 메소드

Apply a skew effect to the image
public skew ( Pop\Color\Space\ColorInterface $color, integer $x, integer $y ) : Imagick
$color Pop\Color\Space\ColorInterface
$x integer
$y integer
리턴 Imagick

swirl() 공개 메소드

Apply a swirl effect to the image
public swirl ( integer $degrees ) : Imagick
$degrees integer
리턴 Imagick

text() 공개 메소드

Create text within the an image object
public text ( string $str, integer | string $size, integer | string $x, integer | string $y, string $font = null, integer | string $rotate = null, boolean $stroke = false ) : Imagick
$str string
$size integer | string
$x integer | string
$y integer | string
$font string
$rotate integer | string
$stroke boolean
리턴 Imagick

wave() 공개 메소드

Apply a wave effect to the image
public wave ( integer $amp, integer $length ) : Imagick
$amp integer
$length integer
리턴 Imagick

프로퍼티 상세

$allowed 보호되어 있는 프로퍼티

Array of allowed file types.
protected array $allowed
리턴 array

$blur 보호되어 있는 프로퍼티

Image blur
protected int $blur
리턴 integer

$compression 보호되어 있는 프로퍼티

Image compression
protected int|string $compression
리턴 integer | string

$filter 보호되어 있는 프로퍼티

Image filter
protected int $filter
리턴 integer

$opacity 보호되어 있는 프로퍼티

Image color opacity
protected float $opacity
리턴 float

$overlay 보호되어 있는 프로퍼티

Image overlay
protected int $overlay
리턴 integer