Class NImageMagick
Manipulation with large images using NImageMagick.
$image = NImage::fromFile('bigphoto.jpg'); $image->resize(150, 100); $image->sharpen(); $image->send();
public
|
#
__construct(
string
$file,
string
& $format = NULL
)
Wraps image file. Wraps image file. Parameters$file string detected image format$format string |
public
int
|
#
getWidth(
)
Returns image width. Returns image width. |
public
int
|
#
getHeight(
)
Returns image height. Returns image height. |
public
resource
|
#
getImageResource(
)
Returns image GD resource. Returns image GD resource. |
public
NImageMagick
|
#
resize(
mixed
$width,
mixed
$height,
int
$flags = 0
)
Resizes image. Resizes image. Parameters$width mixed width in pixels or percent$height mixed height in pixels or percent$flags int flagsReturnsNImageMagick provides a fluent interface
|
public
NImageMagick
|
#
crop(
int
$left,
int
$top,
int
$width,
int
$height
)
Crops image. Crops image. Parameters$left int x-coordinate$top int y-coordinate$width int width$height int heightReturnsNImageMagick provides a fluent interface
|
public
bool
|
#
save(
string
$file = NULL,
int
$quality = NULL,
int
$type = NULL
)
Saves image to the file. Saves image to the file. Parameters$file string filename$quality int quality 0..100 (for JPEG and PNG)$type int optional image typeReturnsbool TRUE on success or FALSE on failure.
|
public
void
|
#
__destruct(
)
Delete temporary files. Delete temporary files. |
Methods Inherited From NImage
rgb(), fromFile(), getFormatFromString(), fromString(), fromBlank(), __construct(), getWidth(), getHeight(), setImageResource(), getImageResource(), resize(), calculateSize(), crop(), sharpen(), place(), save(), toString(), __toString(), send(), __call()
Methods Inherited From NObject
getReflection(), __call(), __callStatic(), extensionMethod(), __get(), __set(), __isset(), __unset()
Constants Inherited From NImage
ENLARGE, STRETCH, FIT, FILL, JPEG, PNG, GIF, EMPTY_GIF
static
string
|
$path | '' |
path to NImageMagick library # |
static
string
|
$tempDir | NULL |
# |
Properties Inherited From NImage
$useImageMagick