Метод |
Описание |
|
__construct ( string $img, integer | string $w = null, integer | string $h = null, Pop\Color\Space\ColorInterface $color = null, array $types = null ) : AbstractImage |
Constructor |
|
border ( integer $w, integer $h = null, integer $type = AbstractImage::INNER_BORDER ) : mixed |
Method to add a border to the image. |
|
brightness ( integer $b ) : mixed |
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 ) : mixed |
Method to colorize the image with the color passed. |
|
contrast ( integer $amount ) : mixed |
Method to adjust the contrast of the image. |
|
convert ( string $type ) : mixed |
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 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. |
|
cropThumb ( integer | string $px, integer | string $x, integer | string $y ) : mixed |
Crop the image object to a square image whose dimensions are based on the
value of the $px 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. For example, if the values of $px = 50, $x = 20, $y = 0 are
passed, then a 50px X 50px image will be created from the original image,
with its origins starting at the (20, 0) x-y coordinates. |
|
destroy ( boolean $file = false ) : void |
Destroy the image object and the related image file directly. |
|
drawArc ( integer $x, integer $y, integer $start, integer $end, integer $w, integer $h = null ) : void |
Method to add an arc to the image. |
|
drawCircle ( integer $x, integer $y, integer $w ) : void |
Method to add a circle to the image. |
|
drawEllipse ( integer $x, integer $y, integer $w, integer $h = null ) : void |
Method to add an ellipse to the image. |
|
drawLine ( integer $x1, integer $y1, integer $x2, integer $y2 ) : void |
Method to add a line to the image. |
|
drawPolygon ( array $points ) : void |
Method to add a polygon to the image. |
|
drawRectangle ( integer $x, integer $y, integer $w, integer $h = null ) : void |
Method to add a rectangle to the image. |
|
drawSquare ( integer $x, integer $y, integer $w ) : void |
Method to add a square to the image. |
|
getChannels ( ) : integer |
Get the number of image channels. |
|
getColorMode ( ) : string |
Get the image color mode. |
|
getColors ( string $format = 'HEX' ) : array |
Return all of the colors in the palette in an array format, omitting any
repeats. It is strongly advised that this method only be used for smaller
image files, preferably with small palettes, as any large images with
many colors will cause this method to run slowly. Default format of the
values in the returned array is the 6-digit HEX value, but if 'RGB' is
passed, then the format of the values in the returned array will be
'R,G,B', i.e. '235,123,12'. |
|
getDepth ( ) : integer |
Get the image bit depth. |
|
getHeight ( ) : integer |
Get the image height. |
|
getWidth ( ) : integer |
Get the image width. |
|
hasAlpha ( ) : boolean |
Get whether or not the image has an alpha channel. |
|
info ( ) : ArrayObject |
Get the image resource info |
|
invert ( ) : mixed |
Method to invert the image (create a negative.) |
|
overlay ( string $ovr, integer | string $x, integer | string $y ) : mixed |
Overlay an image onto the current image. |
|
resize ( integer | string $px ) : mixed |
Resize the image object, allowing for the largest dimension to be scaled
to the value of the $px argument. For example, if the value of $px = 200,
and the image is 800px X 600px, then the image will be scaled to
200px X 150px. |
|
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. |
|
rotate ( integer | string $deg ) : mixed |
Rotate the image object, using simple degrees, i.e. -90,
to rotate the image. |
|
scale ( float | string $scl ) : mixed |
Scale the image object, allowing for the dimensions to be scaled
proportionally to the value of the $scl argument. For example, if the
value of $scl = 0.50, and the image is 800px X 600px, then the image
will be scaled to 400px X 300px. |
|
setBackgroundColor ( Pop\Color\Space\ColorInterface $color = null ) : mixed |
Set the background color. |
|
setFillColor ( Pop\Color\Space\ColorInterface $color = null ) : mixed |
Set the fill color. |
|
setOpacity ( integer | string $opac ) : mixed |
Set the opacity. |
|
setQuality ( integer | string $q = null ) : mixed |
Set the image quality based on the type of image. |
|
setStrokeColor ( Pop\Color\Space\ColorInterface $color = null ) : mixed |
Set the stroke color. |
|
setStrokeWidth ( integer | string $wid = null ) : mixed |
Set the stroke width. |
|
text ( string $str, integer | string $size, integer | string $x, integer | string $y, string $font = null, integer | string $rotate = null, boolean $stroke = false ) : mixed |
Create text within the an image object. A font file can be used for the
font argument. The size, rotation and position can be set by those arguments. |
|