Class Image
Basic manipulation with images.
$image = Image::fromFile('nette.jpg'); $image->resize(150, 100); $image->sharpen(); $image->send();
- Nette\Utils\Image uses Nette\SmartObject
public static
array
|
|
public static
|
|
public static
|
#
fromString( string $s, mixed & $format = null )
Create a new image from the image stream in the string. |
public static
|
|
public
|
|
public
integer
|
|
public
integer
|
|
protected
|
|
public
resource
|
|
public
|
|
public static
array
|
#
calculateSize( mixed $srcWidth, mixed $srcHeight, mixed $newWidth, mixed $newHeight, integer $flags =
Calculates dimensions of resized image. |
public
|
|
public static
array
|
#
calculateCutout( mixed $srcWidth, mixed $srcHeight, mixed $left, mixed $top, mixed $newWidth, mixed $newHeight )
Calculates dimensions of cutout in image. |
public
|
|
public
|
#
place(
Puts another image into this image. |
public
boolean
|
|
public
string
|
#
toString( integer $type =
Outputs image to string. |
public
string
|
|
public
boolean
|
#
send( integer $type =
Outputs image to browser. |
public
mixed
|
|
public
|
|
public
|
__callStatic(),
__get(),
__isset(),
__set(),
__unset(),
extensionMethod(),
getReflection()
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
integer
|
|
public
integer
|
|
public
integer
|
|
public
integer
|
|
public
integer
|
|
public
integer
|
|
public
|
|
public
integer
|
|
public
integer
|
|
public
|
|
public
integer
|
|
public
integer
|
|
public
|
|
public
array
|
|
public
integer
|
|
public
integer
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
array
|
|
public
|
|
public
integer
|
|
public
boolean
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
array
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
array
|
integer |
SHRINK_ONLY
|
# 0b0001 |
integer |
STRETCH
|
# 0b0010 |
integer |
FIT
|
# 0b0000 |
integer |
FILL
|
# 0b0100 |
integer |
EXACT
|
# 0b1000 |
integer |
JPEG
image types |
# IMAGETYPE_JPEG |
integer |
PNG
image types |
# IMAGETYPE_PNG |
integer |
GIF
image types |
# IMAGETYPE_GIF |
integer |
WEBP
image types |
# 18 |
string |
EMPTY_GIF
|
# "GIF89a\x01\x00\x01\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00!\xf9\x04\x01\x00\x00\x00\x00,\x00\x00\x00\x00\x01\x00\x01\x00\x00\x02\x02D\x01\x00;" |
public read-only
integer
|
$width
|
public read-only
integer
|
$height
|
public read-only
resource
|
$imageResource
|