Thinkphp image batch processing tool (generating multiple thumbnails)

Source: Internet
Author: User
Because of the needs of pine forest's own website, an image batch processing function is provided. The company needs to update a website. to put it bluntly, redo the website, but keep the data. The size of the original site image is different from that of the current image.

Because of the needs of pine forest's own website, an image batch processing function is provided. The company needs to update a website. to put it bluntly, it just retries, but the data is retained. The image size of the original site is different from the current image size, so we need to take the size of the original station again. of course, three or four images may be taken, or more. Therefore, it is impossible to upload another batch by yourself. you can only get a batch processing tool and send a batch processing interface below. because the code is scattered, no code is put, finally, let's go directly to the link of a project. if you are interested, please download it directly from the pine forest network disk.
Briefly describe the functions of the tool:
Place all the images to be generated into the Image folder under the Project root directory (the Image does not support the bmp format), and enter the format of the thumbnail to be generated in the Image format, to generate multiple thumbnails, click Add format. The format generated by this tool is the width and height of the image you fill in, because the thumbnail is scaled down and then cropped. Therefore, the size of the final generated image is in strict user input format. If you only want to generate a thumbnail, go to the code and check the cropping method. Finally, enter the name of the folder where the image is to be generated. If this parameter is left blank, an image is generated in the Public directory. If this parameter is left blank, a new folder is created in the Public directory. (The Chinese folder looks garbled and I haven't changed it either ..).

Image batch processing tool: Thinkphp image batch processing
Because the tool is written under thinkphp, you need to modify it if you want to migrate it to your project. This tool is not highly correlated with Thinkphp, so it should be easy to strip.

This article is originally reproduced by Songlin's blog. Please note

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.