Use php and imagemagick to process Upload and zoom of image files

Source: Internet
Author: User
Tags imagemagick
It is easy to use php and imagemagick to process the upload and scaling of image files. However, if you want to scale the uploaded image, you can use GD, however, it is complicated. ImageMagick is an image processing package. generally, SyntaxHighlighter is used in Linux software packages.

It is easy to use php and imagemagick to process the upload and scaling of image files. However, if you want to scale the uploaded image, you can use GD, however, it is complicated. ImageMagick is an image processing package, which is available in common Linux software packages. It includes many image processing tools, which can convert the image file format and perform various processing on the image, in which we will use its image scaling function. This is implemented through the tool convert in its software package. to call the file after convert-geometry width x High source file scaling, create an images directory under the current directory, this directory allows users to write data to the web. it is used to store uploaded images and scaled images. Below is a simple example, including image upload and processing. the test passes in RedHat6.0 + php3.0.12. Uploadform.html: file upload FORM <HTML> <HEAD> <TITLE> select file </TITLE> </HEAD> <body align = "CENTER"> <form ENCTYPE = "multipart/FORM-data "ACTION =" upload. php3 "METHOD = POST> Select image File: <input name = "image" TYPE = "file"> <input type = "submit" VALUE = "Send File"> </FORM> </BODY> </HTML> upload. php3: process uploaded image files

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.