Methods summary
public static
array
|
#
rgb( integer $red, integer $green, integer $blue, integer $transparency = 0 )
Returns RGB color.
Parameters
- $red
integer red 0..255
- $green
integer green 0..255
- $blue
integer blue 0..255
- $transparency
integer transparency 0..127
Returns
array
|
public static
Nette\Image
|
#
fromFile( string $file, mixed & $format = NULL )
Opens image from file.
Parameters
- $file
string
- $format
mixed detected image format
Returns
|
public static
mixed
|
#
getFormatFromString( string $s )
Get format from the image stream in the string.
Get format from the image stream in the string.
Parameters
Returns
mixed detected image format
|
public static
Nette\Image
|
#
fromString( string $s, mixed & $format = NULL )
Create a new image from the image stream in the string.
Create a new image from the image stream in the string.
Parameters
- $s
string
- $format
mixed detected image format
Returns
|
public static
Nette\Image
|
#
fromBlank( integer $width, integer $height, array $color = NULL )
Creates blank image.
Parameters
- $width
integer
- $height
integer
- $color
array
Returns
|
public
|
|
public
integer
|
#
getWidth( )
Returns image width.
Returns
integer
|
public
integer
|
#
getHeight( )
Returns image height.
Returns
integer
|
protected
Nette\Image
|
|
public
resource
|
#
getImageResource( )
Returns image GD resource.
Returns image GD resource.
Returns
resource
|
public
Nette\Image
|
#
resize( mixed $width, mixed $height, integer $flags = Nette\Image::FIT )
Resizes image.
Parameters
- $width
mixed width in pixels or percent
- $height
mixed height in pixels or percent
- $flags
integer flags
Returns
|
public static
array
|
#
calculateSize( mixed $srcWidth, mixed $srcHeight, mixed $newWidth, mixed $newHeight, integer $flags = Nette\Image::FIT )
Calculates dimensions of resized image.
Calculates dimensions of resized image.
Parameters
- $srcWidth
mixed source width
- $srcHeight
mixed source height
- $newWidth
mixed width in pixels or percent
- $newHeight
mixed height in pixels or percent
- $flags
integer flags
Returns
array
|
public
Nette\Image
|
#
crop( mixed $left, mixed $top, mixed $width, mixed $height )
Crops image.
Parameters
- $left
mixed x-offset in pixels or percent
- $top
mixed y-offset in pixels or percent
- $width
mixed width in pixels or percent
- $height
mixed height in pixels or percent
Returns
|
public static
array
|
#
calculateCutout( mixed $srcWidth, mixed $srcHeight, mixed $left, mixed $top, mixed $newWidth, mixed $newHeight )
Calculates dimensions of cutout in image.
Calculates dimensions of cutout in image.
Parameters
- $srcWidth
mixed source width
- $srcHeight
mixed source height
- $left
mixed x-offset in pixels or percent
- $top
mixed y-offset in pixels or percent
- $newWidth
mixed width in pixels or percent
- $newHeight
mixed height in pixels or percent
Returns
array
|
public
Nette\Image
|
|
public
Nette\Image
|
#
place( Nette\Image $image, mixed $left = 0, mixed $top = 0, integer $opacity = 100 )
Puts another image into this image.
Puts another image into this image.
Parameters
- $image
Nette\Image
- $left
mixed x-coordinate in pixels or percent
- $top
mixed y-coordinate in pixels or percent
- $opacity
integer opacity 0..100
Returns
|
public
boolean
|
#
save( string $file = NULL, integer $quality = NULL, integer $type = NULL )
Saves image to the file.
Parameters
- $file
string filename
- $quality
integer quality 0..100 (for JPEG and PNG)
- $type
integer optional image type
Returns
boolean TRUE on success or FALSE on failure.
|
public
string
|
#
toString( integer $type = Nette\Image::JPEG, integer $quality = NULL )
Outputs image to string.
Parameters
- $type
integer image type
- $quality
integer quality 0..100 (for JPEG and PNG)
Returns
string
|
public
string
|
#
__toString( )
Outputs image to string.
Returns
string
|
public
boolean
|
#
send( integer $type = Nette\Image::JPEG, integer $quality = NULL )
Outputs image to browser.
Outputs image to browser.
Parameters
- $type
integer image type
- $quality
integer quality 0..100 (for JPEG and PNG)
Returns
boolean TRUE on success or FALSE on failure.
|
public
mixed
|
#
__call( string $name, array $args )
Call to undefined method.
Call to undefined method.
Parameters
- $name
string method name
- $args
array arguments
Returns
mixed
Throws
Overrides
|
Magic methods summary
public
|
|
public
|
|
public
|
#
arc( mixed $x = , mixed $y = , mixed $w = , mixed $h = , mixed $s = , mixed $e = , mixed $color = )
Parameters
- $x
mixed $x
- $y
mixed $y
- $w
mixed $w
- $h
mixed $h
- $s
mixed $s
- $e
mixed $e
- $color
mixed $color
|
public
|
#
char( mixed $font = , mixed $x = , mixed $y = , mixed $char = , mixed $color = )
Parameters
- $font
mixed $font
- $x
mixed $x
- $y
mixed $y
- $char
mixed $char
- $color
mixed $color
|
public
|
#
charUp( mixed $font = , mixed $x = , mixed $y = , mixed $char = , mixed $color = )
Parameters
- $font
mixed $font
- $x
mixed $x
- $y
mixed $y
- $char
mixed $char
- $color
mixed $color
|
public
integer
|
#
colorAllocate( mixed $red = , mixed $green = , mixed $blue = )
Parameters
- $red
mixed $red
- $green
mixed $green
- $blue
mixed $blue
Returns
integer
|
public
integer
|
#
colorAllocateAlpha( mixed $red = , mixed $green = , mixed $blue = , mixed $alpha = )
Parameters
- $red
mixed $red
- $green
mixed $green
- $blue
mixed $blue
- $alpha
mixed $alpha
Returns
integer
|
public
integer
|
#
colorAt( mixed $x = , mixed $y = )
Parameters
Returns
integer
|
public
integer
|
#
colorClosest( mixed $red = , mixed $green = , mixed $blue = )
Parameters
- $red
mixed $red
- $green
mixed $green
- $blue
mixed $blue
Returns
integer
|
public
integer
|
#
colorClosestAlpha( mixed $red = , mixed $green = , mixed $blue = , mixed $alpha = )
Parameters
- $red
mixed $red
- $green
mixed $green
- $blue
mixed $blue
- $alpha
mixed $alpha
Returns
integer
|
public
integer
|
#
colorClosestHWB( mixed $red = , mixed $green = , mixed $blue = )
Parameters
- $red
mixed $red
- $green
mixed $green
- $blue
mixed $blue
Returns
integer
|
public
|
|
public
integer
|
#
colorExact( mixed $red = , mixed $green = , mixed $blue = )
Parameters
- $red
mixed $red
- $green
mixed $green
- $blue
mixed $blue
Returns
integer
|
public
integer
|
#
colorExactAlpha( mixed $red = , mixed $green = , mixed $blue = , mixed $alpha = )
Parameters
- $red
mixed $red
- $green
mixed $green
- $blue
mixed $blue
- $alpha
mixed $alpha
Returns
integer
|
public
|
|
public
integer
|
#
colorResolve( mixed $red = , mixed $green = , mixed $blue = )
Parameters
- $red
mixed $red
- $green
mixed $green
- $blue
mixed $blue
Returns
integer
|
public
integer
|
#
colorResolveAlpha( mixed $red = , mixed $green = , mixed $blue = , mixed $alpha = )
Parameters
- $red
mixed $red
- $green
mixed $green
- $blue
mixed $blue
- $alpha
mixed $alpha
Returns
integer
|
public
|
#
colorSet( mixed $index = , mixed $red = , mixed $green = , mixed $blue = )
Parameters
- $index
mixed $index
- $red
mixed $red
- $green
mixed $green
- $blue
mixed $blue
|
public
array
|
|
public
integer
|
|
public
integer
|
|
public
|
#
convolution( array $matrix = , float $div = , float $offset = )
Parameters
- $matrix
array $matrix
- $div
float $div
- $offset
float $offset
|
public
|
#
copy( Nette\Image $src = , mixed $dstX = , mixed $dstY = , mixed $srcX = , mixed $srcY = , mixed $srcW = , mixed $srcH = )
Parameters
- $src
Nette\Image $src
- $dstX
mixed $dstX
- $dstY
mixed $dstY
- $srcX
mixed $srcX
- $srcY
mixed $srcY
- $srcW
mixed $srcW
- $srcH
mixed $srcH
|
public
|
#
copyMerge( Nette\Image $src = , mixed $dstX = , mixed $dstY = , mixed $srcX = , mixed $srcY = , mixed $srcW = , mixed $srcH = , mixed $opacity = )
Parameters
- $src
Nette\Image $src
- $dstX
mixed $dstX
- $dstY
mixed $dstY
- $srcX
mixed $srcX
- $srcY
mixed $srcY
- $srcW
mixed $srcW
- $srcH
mixed $srcH
- $opacity
mixed $opacity
|
public
|
#
copyMergeGray( Nette\Image $src = , mixed $dstX = , mixed $dstY = , mixed $srcX = , mixed $srcY = , mixed $srcW = , mixed $srcH = , mixed $opacity = )
Parameters
- $src
Nette\Image $src
- $dstX
mixed $dstX
- $dstY
mixed $dstY
- $srcX
mixed $srcX
- $srcY
mixed $srcY
- $srcW
mixed $srcW
- $srcH
mixed $srcH
- $opacity
mixed $opacity
|
public
|
#
copyResampled( Nette\Image $src = , mixed $dstX = , mixed $dstY = , mixed $srcX = , mixed $srcY = , mixed $dstW = , mixed $dstH = , mixed $srcW = , mixed $srcH = )
Parameters
- $src
Nette\Image $src
- $dstX
mixed $dstX
- $dstY
mixed $dstY
- $srcX
mixed $srcX
- $srcY
mixed $srcY
- $dstW
mixed $dstW
- $dstH
mixed $dstH
- $srcW
mixed $srcW
- $srcH
mixed $srcH
|
public
|
#
copyResized( Nette\Image $src = , mixed $dstX = , mixed $dstY = , mixed $srcX = , mixed $srcY = , mixed $dstW = , mixed $dstH = , mixed $srcW = , mixed $srcH = )
Parameters
- $src
Nette\Image $src
- $dstX
mixed $dstX
- $dstY
mixed $dstY
- $srcX
mixed $srcX
- $srcY
mixed $srcY
- $dstW
mixed $dstW
- $dstH
mixed $dstH
- $srcW
mixed $srcW
- $srcH
mixed $srcH
|
public
|
#
dashedLine( mixed $x1 = , mixed $y1 = , mixed $x2 = , mixed $y2 = , mixed $color = )
Parameters
- $x1
mixed $x1
- $y1
mixed $y1
- $x2
mixed $x2
- $y2
mixed $y2
- $color
mixed $color
|
public
|
#
ellipse( mixed $cx = , mixed $cy = , mixed $w = , mixed $h = , mixed $color = )
Parameters
- $cx
mixed $cx
- $cy
mixed $cy
- $w
mixed $w
- $h
mixed $h
- $color
mixed $color
|
public
|
#
fill( mixed $x = , mixed $y = , mixed $color = )
Parameters
- $x
mixed $x
- $y
mixed $y
- $color
mixed $color
|
public
|
#
filledArc( mixed $cx = , mixed $cy = , mixed $w = , mixed $h = , mixed $s = , mixed $e = , mixed $color = , mixed $style = )
Parameters
- $cx
mixed $cx
- $cy
mixed $cy
- $w
mixed $w
- $h
mixed $h
- $s
mixed $s
- $e
mixed $e
- $color
mixed $color
- $style
mixed $style
|
public
|
#
filledEllipse( mixed $cx = , mixed $cy = , mixed $w = , mixed $h = , mixed $color = )
Parameters
- $cx
mixed $cx
- $cy
mixed $cy
- $w
mixed $w
- $h
mixed $h
- $color
mixed $color
|
public
|
#
filledPolygon( array $points = , mixed $numPoints = , mixed $color = )
Parameters
- $points
array $points
- $numPoints
mixed $numPoints
- $color
mixed $color
|
public
|
#
filledRectangle( mixed $x1 = , mixed $y1 = , mixed $x2 = , mixed $y2 = , mixed $color = )
Parameters
- $x1
mixed $x1
- $y1
mixed $y1
- $x2
mixed $x2
- $y2
mixed $y2
- $color
mixed $color
|
public
|
#
fillToBorder( mixed $x = , mixed $y = , mixed $border = , mixed $color = )
Parameters
- $x
mixed $x
- $y
mixed $y
- $border
mixed $border
- $color
mixed $color
|
public
|
|
public
integer
|
#
fontHeight( mixed $font = )
Parameters
Returns
integer
|
public
integer
|
#
fontWidth( mixed $font = )
Parameters
Returns
integer
|
public
array
|
#
ftBBox( mixed $size = , mixed $angle = , string $fontFile = )
Parameters
- $size
mixed $size
- $angle
mixed $angle
- $fontFile
string $fontFile
Returns
array
|
public
array
|
#
ftText( mixed $size = , mixed $angle = , mixed $x = , mixed $y = , mixed $col = , string $fontFile = )
Parameters
- $size
mixed $size
- $angle
mixed $angle
- $x
mixed $x
- $y
mixed $y
- $col
mixed $col
- $fontFile
string $fontFile
Returns
array
|
public
|
#
gammaCorrect( float $inputgamma = , float $outputgamma = )
Parameters
- $inputgamma
float $inputgamma
- $outputgamma
float $outputgamma
|
public
integer
|
|
public
boolean
|
|
public
|
|
public
|
#
line( mixed $x1 = , mixed $y1 = , mixed $x2 = , mixed $y2 = , mixed $color = )
Parameters
- $x1
mixed $x1
- $y1
mixed $y1
- $x2
mixed $x2
- $y2
mixed $y2
- $color
mixed $color
|
public
integer
|
#
loadFont( string $file = )
Parameters
Returns
integer
|
public
|
|
public
|
#
polygon( array $points = , mixed $numPoints = , mixed $color = )
Parameters
- $points
array $points
- $numPoints
mixed $numPoints
- $color
mixed $color
|
public
array
|
#
psBBox( string $text = , mixed $font = )
Parameters
- $text
string $text
- $font
mixed $font
Returns
array
|
public
|
#
psEncodeFont( mixed $fontIndex = , string $encodingfile = )
Parameters
- $fontIndex
mixed $fontIndex
- $encodingfile
string $encodingfile
|
public
|
#
psExtendFont( mixed $fontIndex = , float $extend = )
Parameters
- $fontIndex
mixed $fontIndex
- $extend
float $extend
|
public
|
#
psFreeFont( mixed $fontindex = )
Parameters
- $fontindex
mixed $fontindex
|
public
resource
|
#
psLoadFont( string $filename = )
Parameters
- $filename
string $filename
Returns
resource
|
public
|
#
psSlantFont( mixed $fontIndex = , float $slant = )
Parameters
- $fontIndex
mixed $fontIndex
- $slant
float $slant
|
public
array
|
#
psText( string $text = , mixed $font = , mixed $size = , mixed $color = , mixed $backgroundColor = , mixed $x = )
Parameters
- $text
string $text
- $font
mixed $font
- $size
mixed $size
- $color
mixed $color
- $backgroundColor
mixed $backgroundColor
- $x
mixed $x
Returns
array
|
public
|
#
rectangle( mixed $x1 = , mixed $y1 = , mixed $x2 = , mixed $y2 = , mixed $col = )
Parameters
- $x1
mixed $x1
- $y1
mixed $y1
- $x2
mixed $x2
- $y2
mixed $y2
- $col
mixed $col
|
public
Nette\Image
|
#
rotate( float $angle = , mixed $backgroundColor = )
Parameters
- $angle
float $angle
- $backgroundColor
mixed $backgroundColor
Returns
|
public
|
#
saveAlpha( boolean $saveflag = )
Parameters
- $saveflag
boolean $saveflag
|
public
|
|
public
|
#
setPixel( mixed $x = , mixed $y = , mixed $color = )
Parameters
- $x
mixed $x
- $y
mixed $y
- $color
mixed $color
|
public
|
|
public
|
#
setThickness( mixed $thickness = )
Parameters
- $thickness
mixed $thickness
|
public
|
|
public
|
#
string( mixed $font = , mixed $x = , mixed $y = , string $s = , mixed $col = )
Parameters
- $font
mixed $font
- $x
mixed $x
- $y
mixed $y
- $s
string $s
- $col
mixed $col
|
public
|
#
stringUp( mixed $font = , mixed $x = , mixed $y = , string $s = , mixed $col = )
Parameters
- $font
mixed $font
- $x
mixed $x
- $y
mixed $y
- $s
string $s
- $col
mixed $col
|
public
|
#
trueColorToPalette( boolean $dither = , mixed $ncolors = )
Parameters
- $dither
boolean $dither
- $ncolors
mixed $ncolors
|
public
array
|
#
ttfBBox( mixed $size = , mixed $angle = , string $fontfile = , string $text = )
Parameters
- $size
mixed $size
- $angle
mixed $angle
- $fontfile
string $fontfile
- $text
string $text
Returns
array
|
public
array
|
#
ttfText( mixed $size = , mixed $angle = , mixed $x = , mixed $y = , mixed $color = , string $fontfile = , string $text = )
Parameters
- $size
mixed $size
- $angle
mixed $angle
- $x
mixed $x
- $y
mixed $y
- $color
mixed $color
- $fontfile
string $fontfile
- $text
string $text
Returns
array
|
public
integer
|
|