AdapterInterface
in
Adapter interface
Tags
Table of Contents
- __toString() : string
- Output the image
- adjust() : AdjustInterface
- Get the image adjust object
- convert() : AdapterInterface
- Convert the image object to another format
- create() : AdapterInterface
- Create a new image resource
- createColor() : mixed
- Create and return a color.
- createIndex() : AdapterInterface
- Create a new indexed image resource
- createResource() : void
- Create the image resource
- crop() : AdapterInterface
- 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() : AdapterInterface
- 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.
- destroy() : void
- Destroy the image object and the related image file directly
- draw() : DrawInterface
- Get the image draw object
- effect() : EffectInterface
- Get the image effect object
- filter() : FilterInterface
- Get the image filter object
- flip() : AdapterInterface
- Method to flip the image over the x-axis
- flop() : AdapterInterface
- Method to flip the image over the y-axis
- getColorspace() : int
- Get the colorspace
- getExif() : array<string|int, mixed>
- Get the image EXIF data
- getHeight() : int
- Get the image height
- getName() : string
- Get the image name
- getResource() : resource
- Get the image resource
- getType() : string
- Get the image type
- getWidth() : int
- Get the image width
- hasResource() : bool
- Determine if there is an image resource
- isCmyk() : bool
- Determine if the image is CMYK
- isGray() : bool
- Determine if the image is grayscale
- isIndexed() : bool
- Determine if the image is index color
- isRgb() : bool
- Determine if the image is RGB
- layer() : LayerInterface
- Get the image layer object
- load() : AdapterInterface
- Load the image resource from the existing image file
- loadFromString() : AdapterInterface
- Load the image resource from data
- outputToHttp() : void
- Output the image object directly to HTTP
- resize() : AdapterInterface
- Resize the image object, allowing for the largest dimension to be scaled to the value of the $px argument.
- resizeToHeight() : AdapterInterface
- Resize the image object to the height parameter passed
- resizeToWidth() : AdapterInterface
- Resize the image object to the width parameter passed
- rotate() : Gd
- Rotate the image object
- scale() : AdapterInterface
- Scale the image object, allowing for the dimensions to be scaled proportionally to the value of the $scl argument.
- sendHeaders() : void
- Send image headers the image
- setAdjust() : AdapterInterface
- Set the image adjust object
- setDraw() : AdapterInterface
- Set the image draw object
- setEffect() : AdapterInterface
- Set the image effect object
- setFilter() : AdapterInterface
- Set the image filter object
- setLayer() : AdapterInterface
- Set the image layer object
- setType() : AdapterInterface
- Set the image type object
- type() : TypeInterface
- Get the image type object
- writeToFile() : void
- Write the image object to a file on disk
Methods
__toString()
Output the image
public
__toString() : string
Return values
string —adjust()
Get the image adjust object
public
adjust() : AdjustInterface
Return values
AdjustInterface —convert()
Convert the image object to another format
public
convert(string $type) : AdapterInterface
Parameters
- $type : string
Tags
Return values
AdapterInterface —create()
Create a new image resource
public
create([int $width = null ][, int $height = null ][, string $name = null ]) : AdapterInterface
Parameters
- $width : int = null
- $height : int = null
- $name : string = null
Return values
AdapterInterface —createColor()
Create and return a color.
public
createColor([ColorInterface $color = null ][, int $alpha = 100 ]) : mixed
Parameters
- $color : ColorInterface = null
- $alpha : int = 100
Tags
Return values
mixed —createIndex()
Create a new indexed image resource
public
createIndex([int $width = null ][, int $height = null ][, string $name = null ]) : AdapterInterface
Parameters
- $width : int = null
- $height : int = null
- $name : string = null
Return values
AdapterInterface —createResource()
Create the image resource
public
createResource() : void
Return values
void —crop()
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.
public
crop(int $w, int $h, int $x, int $y) : AdapterInterface
Parameters
- $w : int
- $h : int
- $x : int
- $y : int
Return values
AdapterInterface —cropThumb()
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.
public
cropThumb(int $px[, int $offset = null ]) : AdapterInterface
Parameters
- $px : int
- $offset : int = null
Return values
AdapterInterface —destroy()
Destroy the image object and the related image file directly
public
destroy([bool $delete = false ]) : void
Parameters
- $delete : bool = false
Return values
void —draw()
Get the image draw object
public
draw() : DrawInterface
Return values
DrawInterface —effect()
Get the image effect object
public
effect() : EffectInterface
Return values
EffectInterface —filter()
Get the image filter object
public
filter() : FilterInterface
Return values
FilterInterface —flip()
Method to flip the image over the x-axis
public
flip() : AdapterInterface
Return values
AdapterInterface —flop()
Method to flip the image over the y-axis
public
flop() : AdapterInterface
Return values
AdapterInterface —getColorspace()
Get the colorspace
public
getColorspace() : int
Return values
int —getExif()
Get the image EXIF data
public
getExif() : array<string|int, mixed>
Return values
array<string|int, mixed> —getHeight()
Get the image height
public
getHeight() : int
Return values
int —getName()
Get the image name
public
getName() : string
Return values
string —getResource()
Get the image resource
public
getResource() : resource
Return values
resource —getType()
Get the image type
public
getType() : string
Return values
string —getWidth()
Get the image width
public
getWidth() : int
Return values
int —hasResource()
Determine if there is an image resource
public
hasResource() : bool
Return values
bool —isCmyk()
Determine if the image is CMYK
public
isCmyk() : bool
Return values
bool —isGray()
Determine if the image is grayscale
public
isGray() : bool
Return values
bool —isIndexed()
Determine if the image is index color
public
isIndexed() : bool
Return values
bool —isRgb()
Determine if the image is RGB
public
isRgb() : bool
Return values
bool —layer()
Get the image layer object
public
layer() : LayerInterface
Return values
LayerInterface —load()
Load the image resource from the existing image file
public
load([string $name = null ]) : AdapterInterface
Parameters
- $name : string = null
Return values
AdapterInterface —loadFromString()
Load the image resource from data
public
loadFromString(string $data[, string $name = null ]) : AdapterInterface
Parameters
- $data : string
- $name : string = null
Return values
AdapterInterface —outputToHttp()
Output the image object directly to HTTP
public
outputToHttp([int $quality = 100 ][, string $to = null ][, bool $download = false ][, bool $sendHeaders = true ]) : void
Parameters
- $quality : int = 100
- $to : string = null
- $download : bool = false
- $sendHeaders : bool = true
Tags
Return values
void —resize()
Resize the image object, allowing for the largest dimension to be scaled to the value of the $px argument.
public
resize(int $px) : AdapterInterface
Parameters
- $px : int
Return values
AdapterInterface —resizeToHeight()
Resize the image object to the height parameter passed
public
resizeToHeight(int $h) : AdapterInterface
Parameters
- $h : int
Return values
AdapterInterface —resizeToWidth()
Resize the image object to the width parameter passed
public
resizeToWidth(int $w) : AdapterInterface
Parameters
- $w : int
Return values
AdapterInterface —rotate()
Rotate the image object
public
rotate(int $degrees[, ColorInterface $bgColor = null ]) : Gd
Parameters
- $degrees : int
- $bgColor : ColorInterface = null
Tags
Return values
Gd —scale()
Scale the image object, allowing for the dimensions to be scaled proportionally to the value of the $scl argument.
public
scale(float $scale) : AdapterInterface
Parameters
- $scale : float
Return values
AdapterInterface —sendHeaders()
Send image headers the image
public
sendHeaders([string $to = null ][, bool $download = false ]) : void
Parameters
- $to : string = null
- $download : bool = false
Return values
void —setAdjust()
Set the image adjust object
public
setAdjust(AdjustInterface $adjust) : AdapterInterface
Parameters
- $adjust : AdjustInterface
Return values
AdapterInterface —setDraw()
Set the image draw object
public
setDraw(DrawInterface $draw) : AdapterInterface
Parameters
- $draw : DrawInterface
Return values
AdapterInterface —setEffect()
Set the image effect object
public
setEffect(EffectInterface $effect) : AdapterInterface
Parameters
- $effect : EffectInterface
Return values
AdapterInterface —setFilter()
Set the image filter object
public
setFilter(FilterInterface $filter) : AdapterInterface
Parameters
- $filter : FilterInterface
Return values
AdapterInterface —setLayer()
Set the image layer object
public
setLayer(LayerInterface $layer) : AdapterInterface
Parameters
- $layer : LayerInterface
Return values
AdapterInterface —setType()
Set the image type object
public
setType(TypeInterface $type) : AdapterInterface
Parameters
- $type : TypeInterface
Return values
AdapterInterface —type()
Get the image type object
public
type() : TypeInterface
Return values
TypeInterface —writeToFile()
Write the image object to a file on disk
public
writeToFile([string $to = null ][, int $quality = 100 ]) : void
Parameters
- $to : string = null
- $quality : int = 100