Imagick
在线手册:中文 英文
PHP手册

Imagick::writeImage

(PECL imagick 0.9.0-0.9.9)

Imagick::writeImageWrites an image to the specified filename

说明

bool Imagick::writeImage ([ string $filename ] )

Writes an image to the specified filename. If the filename parameter is NULL, the image is written to the filename set by Imagick::ReadImage() or Imagick::SetImageFilename().

参数

filename

返回值

成功时返回 TRUE .


Imagick
在线手册:中文 英文
PHP手册
PHP手册 - N: Writes an image to the specified filename

用户评论:

icinagle at gmail dot com (24-May-2011 02:47)

If you are trying to manipulate a uploaded file and then save the file all in the same request with Apache + mod_dav this will fail.
mod_dav puts a lock on the file during the request where the file is uploaded so trying to save the smallest file, e.g. 1kb will fail with a "Failed to allocate memory" error.

http://aotd.ru (19-Apr-2008 12:12)

$thumb = new Imagick();
$thumb->readImage('test.gif');
$thumb->writeImage('test.jpg');
$thumb->clear();
$thumb->destroy();