PHP generate PSD thumbnail _php tutorial

Source: Internet
Author: User
Tags imagemagick php windows
1.PSD files for the Photoshop file format, the browser can not directly display, there is a need to generate a PSD file preview, Google for a few days did not find the available code, so that their own research, finally found a solution, the PSD is exported to a JPG file, Then generate thumbnails for them, which makes it much easier.

2. Need to use an open source library to PHP: ImageMagick, installation method: Google search "imagemagick php Windows Installation", of course, if you are Linux, replace Windows with Linux.

3. Installed, the key is how to use, after a few hours of tossing, the final realization of the conversion, very simple:

$MW = Newmagickwand ();
Magickreadimage ($MW, 123.PSD);
Magickresetiterator ($MW);
Magickwriteimage ($MW, "123.jpg");


http://www.bkjia.com/PHPjc/478782.html www.bkjia.com true http://www.bkjia.com/PHPjc/478782.html techarticle 1.psd file for photoshop file format, the browser can not directly display, there is a need to generate a PSD file preview, Google for a few days did not find the code available, so I researched the next ...

  • 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.