Window PHP Imagick save picture not successful
Issue: Under Windows Imagick::writeimage () Success picture is unsuccessful, and no return value does not know why? However, under Linux it is possible to succeed successfully.
But
$this->image = new Imagick ($path);//$path Save the path of the picture;
...... (Set some properties of the picture, code omitted)
Method One: $this->image->writeimage ($path); Not successful
Method Two: File_put_contents ($path, $this->image); Success
Imagick version: Imagemagick-6.8.7-7-q16-x86-dll.exe
PHP Version: 5.4.16
Ask the big God to tell the reason
PHP Imagick Success Picture
Share to:
------Solution--------------------
Imagick more trouble, PHP and Imagick version has compatibility issues, you have to find a suitable version of the line.
------Solution--------------------
If it is only
Method One: $this->image->writeimage ($path); Not successful
Method Two: File_put_contents ($path, $this->image); Success
That's not ImageMagick's problem, it's your problem!
1, may be in the path with Chinese
2. Possible path is a long path name with spaces
3, may be the relative path when the absolute path processing