PHP 클래스 Pimcore\Image\Adapter\ImageMagick

상속: extends Pimcore\Image\Adapter
파일 보기 프로젝트 열기: pimcore/pimcore 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$compositeCommandOptions array Options used by the composite script
$compositeScriptPath string
$convertCommandOptions array Options used by the convert script
$convertFilters array Array with filters used with options
$convertScriptPath string
$forceAlpha null
$imagePath null | string The base image path
$outputPath null | string
$resource null | Imagick

공개 메소드들

메소드 설명
addCompositeOption ( $name, null $value = null ) : ImageMagick Add option available in the composite tool
addConvertOption ( $name, null $value = null ) : ImageMagick Add option to the command
addFilter ( $optionName, $filterValue ) Add a filter to the convert command
addOverlay ( string $image, integer $x, integer $y, integer $alpha = 100, string $composite = "COMPOSITE_DEFAULT", string $origin = 'top-left' ) : ImageMagick
addOverlayFit ( $image, string $composite = "COMPOSITE_DEFAULT" ) : ImageMagick
applyMask ( $image ) : ImageMagick Add mask to the image
brightnessSaturation ( integer $brightness = 100, integer $saturation = 100, integer $hue = 100 ) : ImageMagick Brightness, saturation and hue setting of the image.
crop ( $x, $y, $width, $height ) : ImageMagick Cuts out a box of the image starting at the given X,Y coordinates and using the width and height.
cropPercent ( $x, $y, $width, $height ) Cuts out a box of the image starting at the given X,Y coordinates and using percentage values of width and height.
frame ( $width, $height ) : ImageMagick Adds frame which cause that the image gets exactly the entered dimensions by adding borders.
gaussianBlur ( integer $radius, float $sigma = 1 ) Blur the image.
generateCanvas ( $width, $height, $color ) : ImageMagick It generates a basic canvas file with specified size and color
getCompositeCommand ( ) : string Return the composite command as a string
getCompositeOptionsAsString ( ) : string Returns the composite options as a string
getCompositeScriptPath ( ) : string Returns the composite cli script path.
getConvertCommand ( ) : string Return the command without an output file path
getConvertFilters ( $optionName ) : array Returns the filters array
getConvertOptionsAsString ( ) : string Returns options parameter for the convert command
getConvertScriptPath ( ) : string Returns the convert cli script path.
getForceAlpha ( ) : boolean
getOutputPath ( ) : null | string
grayscale ( $method = "Rec601Luma" ) : ImageMagick Converts the image into a linear-grayscale image.
load ( $imagePath, array $options = [] ) : ImageMagick loads the image by the specified path
mergeImage ( ImageMagick $backgroundImage ) : ImageMagick Merges the image specified as the argument into the main picture.
mirror ( $mode ) : ImageMagick Creates vertical or horizontal mirror of the image.
resize ( $width, $height ) Resize the image
rotate ( $angle ) : ImageMagick Rotates the image with the given angle.
roundCorners ( $width, $height ) : ImageMagick Rounds the corners to the given width/height.
save ( $path, null $format = null, null $quality = null ) Save the modified image output in the specified path as the first argument.
saveIfRequired ( string $suffix )
sepia ( ) : ImageMagick Applies the sepia effect into the image.
setBackgroundColor ( $color ) : ImageMagick Set the background color of the image.
setBackgroundImage ( $image, null $mode = null, $relativePath = false ) : ImageMagick Set the image background
setCompositeScriptPath ( $compositeScriptPath ) : ImageMagick Composite script path, as a default the adapter is just using 'composite'.
setConvertScriptPath ( $convertScriptPath ) : ImageMagick Convert script path, as a default the adapter is just using 'convert'.
setForceAlpha ( boolean $forceAlpha ) : ImageMagick
setOutputPath ( $path ) : ImageMagick
sharpen ( integer $radius, float $sigma = 1, float $amount = 1, float $threshold = 0.05 ) : ImageMagick Sharpen the image.
trim ( integer $tolerance ) : ImageMagick Trims edges

보호된 메소드들

메소드 설명
createTmpImage ( $imagePath, $suffix ) : ImageMagick Creates the tmp image, that image will be automatically deleted when the process finishes.
destroy ( ) : ImageMagick
initResource ( ) : ImageMagick
processCommand ( $command ) : integer
processOverlay ( ImageMagick $overlayImage, string $composite = "COMPOSITE_DEFAULT", $x, $y, $overlayOpacity = 100 ) : ImageMagick
setTmpPaths ( ImageMagick $image, $suffix )

메소드 상세

addCompositeOption() 공개 메소드

Add option available in the composite tool
public addCompositeOption ( $name, null $value = null ) : ImageMagick
$name
$value null
리턴 ImageMagick

addConvertOption() 공개 메소드

Add option to the command
public addConvertOption ( $name, null $value = null ) : ImageMagick
$name
$value null
리턴 ImageMagick

addFilter() 공개 메소드

Add a filter to the convert command
public addFilter ( $optionName, $filterValue )
$optionName
$filterValue

addOverlay() 공개 메소드

public addOverlay ( string $image, integer $x, integer $y, integer $alpha = 100, string $composite = "COMPOSITE_DEFAULT", string $origin = 'top-left' ) : ImageMagick
$image string
$x integer
$y integer
$alpha integer
$composite string
$origin string
리턴 ImageMagick

addOverlayFit() 공개 메소드

public addOverlayFit ( $image, string $composite = "COMPOSITE_DEFAULT" ) : ImageMagick
$image
$composite string
리턴 ImageMagick

applyMask() 공개 메소드

Add mask to the image
public applyMask ( $image ) : ImageMagick
$image
리턴 ImageMagick

brightnessSaturation() 공개 메소드

Brightness, saturation and hue setting of the image.
public brightnessSaturation ( integer $brightness = 100, integer $saturation = 100, integer $hue = 100 ) : ImageMagick
$brightness integer
$saturation integer
$hue integer
리턴 ImageMagick

createTmpImage() 보호된 메소드

Creates the tmp image, that image will be automatically deleted when the process finishes.
protected createTmpImage ( $imagePath, $suffix ) : ImageMagick
$imagePath
$suffix
리턴 ImageMagick

crop() 공개 메소드

Cuts out a box of the image starting at the given X,Y coordinates and using the width and height.
public crop ( $x, $y, $width, $height ) : ImageMagick
$x
$y
$width
$height
리턴 ImageMagick

cropPercent() 공개 메소드

Cuts out a box of the image starting at the given X,Y coordinates and using percentage values of width and height.
public cropPercent ( $x, $y, $width, $height )
$x
$y
$width
$height

destroy() 보호된 메소드

protected destroy ( ) : ImageMagick
리턴 ImageMagick

frame() 공개 메소드

Adds frame which cause that the image gets exactly the entered dimensions by adding borders.
public frame ( $width, $height ) : ImageMagick
$width
$height
리턴 ImageMagick

gaussianBlur() 공개 메소드

Blur the image.
public gaussianBlur ( integer $radius, float $sigma = 1 )
$radius integer
$sigma float

generateCanvas() 공개 메소드

It generates a basic canvas file with specified size and color
public generateCanvas ( $width, $height, $color ) : ImageMagick
$width
$height
$color
리턴 ImageMagick

getCompositeCommand() 공개 메소드

Return the composite command as a string
public getCompositeCommand ( ) : string
리턴 string

getCompositeOptionsAsString() 공개 메소드

Returns the composite options as a string

getCompositeScriptPath() 공개 메소드

Returns the composite cli script path.
public getCompositeScriptPath ( ) : string
리턴 string

getConvertCommand() 공개 메소드

Return the command without an output file path
public getConvertCommand ( ) : string
리턴 string

getConvertFilters() 공개 메소드

Returns the filters array
public getConvertFilters ( $optionName ) : array
$optionName
리턴 array

getConvertOptionsAsString() 공개 메소드

Returns options parameter for the convert command

getConvertScriptPath() 공개 메소드

Returns the convert cli script path.
public getConvertScriptPath ( ) : string
리턴 string

getForceAlpha() 공개 메소드

public getForceAlpha ( ) : boolean
리턴 boolean

getOutputPath() 공개 메소드

public getOutputPath ( ) : null | string
리턴 null | string

grayscale() 공개 메소드

Converts the image into a linear-grayscale image.
public grayscale ( $method = "Rec601Luma" ) : ImageMagick
리턴 ImageMagick

initResource() 보호된 메소드

protected initResource ( ) : ImageMagick
리턴 ImageMagick

load() 공개 메소드

loads the image by the specified path
public load ( $imagePath, array $options = [] ) : ImageMagick
$imagePath
$options array
리턴 ImageMagick

mergeImage() 공개 메소드

Merges the image specified as the argument into the main picture.
public mergeImage ( ImageMagick $backgroundImage ) : ImageMagick
$backgroundImage ImageMagick
리턴 ImageMagick

mirror() 공개 메소드

Creates vertical or horizontal mirror of the image.
public mirror ( $mode ) : ImageMagick
$mode
리턴 ImageMagick

processCommand() 보호된 메소드

protected processCommand ( $command ) : integer
$command
리턴 integer

processOverlay() 보호된 메소드

protected processOverlay ( ImageMagick $overlayImage, string $composite = "COMPOSITE_DEFAULT", $x, $y, $overlayOpacity = 100 ) : ImageMagick
$overlayImage ImageMagick
$composite string
리턴 ImageMagick

resize() 공개 메소드

Resize the image
public resize ( $width, $height )
$width
$height

rotate() 공개 메소드

Rotates the image with the given angle.
public rotate ( $angle ) : ImageMagick
$angle
리턴 ImageMagick

roundCorners() 공개 메소드

Rounds the corners to the given width/height.
public roundCorners ( $width, $height ) : ImageMagick
$width
$height
리턴 ImageMagick

save() 공개 메소드

Save the modified image output in the specified path as the first argument.
public save ( $path, null $format = null, null $quality = null )
$path
$format null
$quality null

saveIfRequired() 공개 메소드

public saveIfRequired ( string $suffix )
$suffix string a thumbnail identifier

sepia() 공개 메소드

Applies the sepia effect into the image.
public sepia ( ) : ImageMagick
리턴 ImageMagick

setBackgroundColor() 공개 메소드

Set the background color of the image.
public setBackgroundColor ( $color ) : ImageMagick
$color
리턴 ImageMagick

setBackgroundImage() 공개 메소드

Set the image background
public setBackgroundImage ( $image, null $mode = null, $relativePath = false ) : ImageMagick
$image
$mode null
리턴 ImageMagick

setCompositeScriptPath() 공개 메소드

Composite script path, as a default the adapter is just using 'composite'.
public setCompositeScriptPath ( $compositeScriptPath ) : ImageMagick
리턴 ImageMagick

setConvertScriptPath() 공개 메소드

Convert script path, as a default the adapter is just using 'convert'.
public setConvertScriptPath ( $convertScriptPath ) : ImageMagick
$convertScriptPath
리턴 ImageMagick

setForceAlpha() 공개 메소드

public setForceAlpha ( boolean $forceAlpha ) : ImageMagick
$forceAlpha boolean
리턴 ImageMagick

setOutputPath() 공개 메소드

public setOutputPath ( $path ) : ImageMagick
$path
리턴 ImageMagick

setTmpPaths() 보호된 메소드

protected setTmpPaths ( ImageMagick $image, $suffix )
$image ImageMagick

sharpen() 공개 메소드

Sharpen the image.
public sharpen ( integer $radius, float $sigma = 1, float $amount = 1, float $threshold = 0.05 ) : ImageMagick
$radius integer
$sigma float
$amount float
$threshold float
리턴 ImageMagick

trim() 공개 메소드

Trims edges
public trim ( integer $tolerance ) : ImageMagick
$tolerance integer
리턴 ImageMagick

프로퍼티 상세

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

Options used by the composite script
protected array $compositeCommandOptions
리턴 array

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

protected string $compositeScriptPath
리턴 string

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

Options used by the convert script
protected array $convertCommandOptions
리턴 array

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

Array with filters used with options
protected array $convertFilters
리턴 array

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

protected string $convertScriptPath
리턴 string

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

protected null $forceAlpha
리턴 null

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

The base image path
protected null|string $imagePath
리턴 null | string

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

protected null|string $outputPath
리턴 null | string

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

protected null|Imagick,Pimcore\Image\Adapter $resource
리턴 null | Imagick