Window PHP Imagick Save the picture is not successful, how to solve

Source: Internet
Author: User
Tags imagemagick
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
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.