Windowphpimagick cannot save the image. how can this problem be solved?

Source: Internet
Author: User
Windowphpimagick failed to save the image: & nbsp; imagick: writeImage () success Image failed, and no returned value & nbsp; & nbsp; do not know why? But in linux, it is successful. However, $ this window php imagick fails to save the image.
Q: In windows, imagick: writeImage () is successful. the image fails, and no return value is returned. why? But in linux, it is successful.
However
$ This-> image = new Imagick ($ path); // $ path stores the image path;
...... (Set some attributes of the image, and the code is omitted)
Method 1: $ this-> image-> writeImage ($ path); unsuccessful
Method 2: file_put_contents ($ path, $ this-> image); succeeded

Imagick: ImageMagick-6.8.7-7-Q16-x86-dll.exe
Php version: 5.4.16


Please tell us why

Php imagick successfully shares the image:
------ Solution --------------------
Imagick is troublesome. If PHP and imagick versions have compatibility problems, you must find a suitable version.
------ Solution --------------------
If only
Method 1: $ this-> image-> writeImage ($ path); unsuccessful
Method 2: file_put_contents ($ path, $ this-> image); succeeded
It's not about ImageMagick, but about you!
1. the path may contain Chinese characters.
2. possible paths are long path names with spaces
3. the relative path may be treated as an absolute path.

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.