$resource
$resource : mixed
Image resource
Abstract raster image class
$draw : \Pop\Image\Draw\DrawInterface
Image draw object
$effect : \Pop\Image\Effect\EffectInterface
Image effect object
$type : \Pop\Image\Type\TypeInterface
Image type object
$adjust : \Pop\Image\Adjust\AdjustInterface
Image adjust object
$filter : \Pop\Image\Filter\FilterInterface
Image filter object
$layer : \Pop\Image\Layer\LayerInterface
Image layer object
__construct(string $img = null, integer $w = null, integer $h = null) : \Pop\Image\AbstractImage
Constructor
Instantiate an image object based on either a pre-existing image file on disk, or a new image file.
string | $img | |
integer | $w | |
integer | $h |
setDraw(\Pop\Image\Draw\DrawInterface $draw) : \Pop\Image\AbstractImage
Set the image draw object
\Pop\Image\Draw\DrawInterface | $draw |
setEffect(\Pop\Image\Effect\EffectInterface $effect) : \Pop\Image\AbstractImage
Set the image effect object
\Pop\Image\Effect\EffectInterface | $effect |
setType(\Pop\Image\Type\TypeInterface $type) : \Pop\Image\AbstractImage
Set the image type object
\Pop\Image\Type\TypeInterface | $type |
draw() : \Pop\Image\Draw\DrawInterface
Get the image draw object
effect() : \Pop\Image\Effect\EffectInterface
Get the image effect object
type() : \Pop\Image\Type\TypeInterface
Get the image type object
create(integer $width, integer $height, string $image = null) : \Pop\Image\AbstractImage
Create a new image resource
integer | $width | |
integer | $height | |
string | $image |
load(string $image) : \Pop\Image\AbstractImage
Load an existing image as a resource
string | $image |
setAdjust(\Pop\Image\Adjust\AdjustInterface $adjust) : \Pop\Image\AbstractImage
Set the image adjust object
\Pop\Image\Adjust\AdjustInterface | $adjust |
setFilter(\Pop\Image\Filter\FilterInterface $filter) : \Pop\Image\AbstractImage
Set the image filter object
\Pop\Image\Filter\FilterInterface | $filter |
setLayer(\Pop\Image\Layer\LayerInterface $layer) : \Pop\Image\AbstractImage
Set the image layer object
\Pop\Image\Layer\LayerInterface | $layer |
setBackgroundColor(integer $r, integer $g, integer $b) : \Pop\Image\AbstractImage
Set the image adjust object
integer | $r | |
integer | $g | |
integer | $b |
adjust() : \Pop\Image\Adjust\AdjustInterface
Get the image adjust object
filter() : \Pop\Image\Filter\FilterInterface
Get the image filter object
layer() : \Pop\Image\Layer\LayerInterface
Get the image layer object
setQuality(integer $quality) : \Pop\Image\AbstractImage
Set the image quality.
integer | $quality |
resizeToWidth(integer $w) : \Pop\Image\AbstractImage
Resize the image object to the width parameter passed.
integer | $w |
resizeToHeight(integer $h) : \Pop\Image\AbstractImage
Resize the image object to the height parameter passed.
integer | $h |
resize(integer $px) : \Pop\Image\AbstractImage
Resize the image object, allowing for the largest dimension to be scaled to the value of the $px argument.
integer | $px |
scale(float $scale) : \Pop\Image\AbstractImage
Scale the image object, allowing for the dimensions to be scaled proportionally to the value of the $scl argument.
float | $scale |
crop(integer $w, integer $h, integer $x, integer $y) : \Pop\Image\AbstractImage
Crop the image object to a image whose dimensions are based on the value of the $wid and $hgt argument. The optional $x and $y arguments allow for the adjustment of the crop to select a certain area of the image to be cropped.
integer | $w | |
integer | $h | |
integer | $x | |
integer | $y |
cropThumb(integer $px, integer $offset = null) : \Pop\Image\AbstractImage
Crop the image object to a square image whose dimensions are based on the value of the $px argument. The optional $offset argument allows for the adjustment of the crop to select a certain area of the image to be cropped.
integer | $px | |
integer | $offset |
rotate(integer $degrees, array $bgColor = array(255, 255, 255)) : \Pop\Image\AbstractImage
Rotate the image object
integer | $degrees | |
array | $bgColor |
flip() : \Pop\Image\AbstractImage
Method to flip the image over the x-axis.
flop() : \Pop\Image\AbstractImage
Method to flip the image over the y-axis.
convert(string $type) : \Pop\Image\AbstractImage
Convert the image object to another format.
string | $type |