imageaffine
Description
The imageaffine of Image for PHP return an image containing the affine transformed src image, using an optional clipping area.
Syntax
imageaffine( GdImage $image, array $affine, ?array $clip = null ): GdImage|false
Parameters
image
A GdImage object, returned by one of the image creation functions, such as imagecreatetruecolor().
affine
Array with keys 0 to 5.
clip
Array with keys "x", "y", "width" and "height"; or null.
Return
Return affined image object on success or false on failure.
Examples
1 · image affine
<? $width = 100; $height = 100; $image = imagecreate($width, $height); $affine = array(1, 0, 0, 1, 0, 0); $return = imageaffine($image, $affine); var_dump($return); ?>
object(GdImage)#2 (0) { }
2 · clip
<? $width = 100; $height = 100; $image = imagecreate($width, $height); $affine = array(1, 0, 0, 1, 0, 0); $clip = array('x' => 0, 'y' => 0, 'width' => $width, 'height' => $height); $return = imageaffine($image, $affine, $clip); var_dump($return); ?>
object(GdImage)#2 (0) { }
Links
Image
- gd_info
- getimagesize
- getimagesizefromstring
- image_type_to_extension
- image_type_to_mime_type
- imageaffinematrixconcat
- imageaffinematrixget
- imagealphablending
- imageantialias
- imagearc
- imageavif
- imagebmp
- imagechar
- imagecharup
- imagecolorallocate
- imagecolorallocatealpha
- imagecolorat
- imagecolorclosest
- imagecolorclosestalpha
- imagecolorclosesthwb
- imagecolordeallocate
- imagecolorexact
- imagecolorexactalpha
- imagecolormatch
- imagecolorresolve
- imagecolorresolvealpha
- imagecolorset
- imagecolorsforindex
- imagecolorstotal
- imagecolortransparent
- imageconvolution
- imagecopy
- imagecopymerge
- imagecopymergegray
- imagecopyresampled
- imagecopyresized
- imagecreate
- imagecreatefromavif
- imagecreatefrombmp
- imagecreatefromgif
- imagecreatefromjpeg
- imagecreatefrompng
- imagecreatefromstring
- imagecreatefromtga
- imagecreatefromwbmp
- imagecreatefromwebp
- imagecreatefromxbm
- imagecreatefromxpm
- imagecreatetruecolor
- imagecrop
- imagecropauto
- imagedashedline
- imagedestroy
- imageellipse
- imagefill
- imagefilledarc
- imagefilledellipse
- imagefilledpolygon
- imagefilledrectangle
- imagefilltoborder
- imagefilter
- imageflip
- imagefontheight
- imagefontwidth
- imageftbbox
- imagefttext
- imagegammacorrect
- imagegetclip
- imagegetinterpolation
- imagegif
- imageinterlace
- imageistruecolor
- imagejpeg
- imagelayereffect
- imageline
- imageloadfont
- imageopenpolygon
- imagepalettecopy
- imagepalettetotruecolor
- imagepng
- imagepolygon
- imagerectangle
- imageresolution
- imagerotate
- imagesavealpha
- imagescale
- imagesetbrush
- imagesetclip
- imagesetinterpolation
- imagesetpixel
- imagesetstyle
- imagesetthickness
- imagesettile
- imagestring
- imagestringup
- imagesx
- imagesy
- imagetruecolortopalette
- imagettfbbox
- imagettftext
- imagetypes
- imagewbmp
- imagewebp
- imagexbm
- iptcembed
- iptcparse