Imagick cannot edit remote url Images

Source: Internet
Author: User
{Code ...} let's look at my code. I wrote the code according to the sample code in the official php documentation. Theoretically, the code quality is guaranteed, but I still reported an error: {code ...} it is okay for me to test the image locally. You can use the absolute path to open the image and perform normal image operations...

  readImageFile($handle);$img->resizeImage(128, 128, 0, 0);echo $img;

Let's look at my code. I wrote the code according to the sample code in the official php documentation. Theoretically, the code quality is guaranteed, but I still reported an error:

( ! ) Fatal error: Uncaught exception 'ImagickException' with message 'Unable to read image from the filehandle' in D:\wampServer\www\test\index.php on line 5( ! ) ImagickException: Unable to read image from the filehandle in D:\wampServer\www\test\index.php on line 5Call Stack#TimeMemoryFunctionLocation10.0000139136{main}( )..\index.php:020.0700150424readimagefile ( )..\index.php:5

I can test the image locally. You can use the absolute path to open the image and perform normal operations.
The following shows the environment:

How can I solve this problem?

Reply content:

  readImageFile($handle);$img->resizeImage(128, 128, 0, 0);echo $img;

Let's look at my code. I wrote the code according to the sample code in the official php documentation. Theoretically, the code quality is guaranteed, but I still reported an error:

( ! ) Fatal error: Uncaught exception 'ImagickException' with message 'Unable to read image from the filehandle' in D:\wampServer\www\test\index.php on line 5( ! ) ImagickException: Unable to read image from the filehandle in D:\wampServer\www\test\index.php on line 5Call Stack#TimeMemoryFunctionLocation10.0000139136{main}( )..\index.php:020.0700150424readimagefile ( )..\index.php:5

I can test the image locally. You can use the absolute path to open the image and perform normal operations.
The following shows the environment:

How can I solve this problem?

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.