$gd
$gd : resource
Image class for GD.
__construct(resource $gd, string $imageFile, integer $width, integer $height, string $type, string $blocks = '', boolean $animated = false)
Image constructor.
resource | $gd | Must use GD's imagecreate* family of functions to create a GD resource. |
string | $imageFile | |
integer | $width | |
integer | $height | |
string | $type | |
string | $blocks | |
boolean | $animated |
blob(string|\Grafika\ImageType $type = 'PNG')
Output a binary raw dump of an image in a specified format.
string|\Grafika\ImageType | $type | Image format of the dump. |
When unsupported type.
createFromFile(string $imageFile) : \Grafika\Gd\Image
Create Image from image file.
string | $imageFile | Path to image. |
createFromCore(resource $gd) : \Grafika\Gd\Image
Create an Image from a GD resource. The file type defaults to unknown.
resource | $gd | GD resource. |
createBlank(integer $width = 1, integer $height = 1) : \Grafika\Gd\Image
Create a blank image.
integer | $width | Width in pixels. |
integer | $height | Height in pixels. |
histogram(array|null $slice = null) : array
Get histogram from an entire image or its sub-region.
array|null | $slice | Array of slice information. array( array( 0,0), array(100,50)) means x,y is 0,0 and width,height is 100,50 |
Returns array containing RGBA bins array('r'=>array(), 'g'=>array(), 'b'=>array(), 'a'=>array())
_createGif(string $imageFile) : \Grafika\Gd\Image
Load a GIF image.
string | $imageFile |
_createJpeg(string $imageFile) : \Grafika\Gd\Image
Load a JPEG image.
string | $imageFile | File path to image. |
_createPng(string $imageFile) : \Grafika\Gd\Image
Load a PNG image.
string | $imageFile | File path to image. |
_createWbmp(string $imageFile) : \Grafika\Gd\Image
Load a WBMP image.
string | $imageFile |