1, this is a thumbnail class library
It is an open source image Thumbnail class library, can complete a variety of complex image thumbnail generation and reality, very convenient to use.
2. How to use
Here is a simple and practical explanation, English is relatively simple, do not translate:
Basic-usage
3. API
Here is a list of APIs:
Phpthumb API
Unfort
Note: This feature relies on the GD2 graphics library
recently to use PHP to generate thumbnails, find a bit online, found this article: PHP Generate thumbnail image
After a trial, we found that there were several problems:
1. PNG images generated thumbnails are in JPG format
2. PNG images generated thumbnails without transparent (translucent) effect (filled with black background)
3, the code syntax is relatively old
So, on the basis of this version
Function: Support jpg,jpeg,gif,png,bmp picture format, support the scale of the original picture, you can choose whether to cut the picture in the process of image zooming, add the picture quality control, can achieve the highest quality of thumbnail image. The code for the complete class is as follows:
Php/** * Function: PHP generated thumbnail image of the class*/classresizeimage{ Public$type;//type o
Support PNG transparent image of PHP generated thumbnail class sharing,
Note: This feature relies on the GD2 graphics library
Recently to use PHP to generate thumbnails, find a bit online, found this article: PHP generated thumbnail image
After a trial, we found that there were several problems:
1. PNG images generated thumbnails are in JPG format
2. PNG images generated thumbnails without transparent (tra
Use of two image system functionsimagecopymerge- Copy and merge part of an imageimagecopyresampled-resampling and resizing copies of portions of images/* How to know the size and type of the picture cannot confirm the calling function: Imagecreatefrompng/jpeg ... Can be left alone the width and height of the picture is known as an important function getimagesize () *//* want to manipulate the picture first the size of the picture, type information to get a watermark: is to copy the specified wat
generated, others are not generated );Private $ imgpreviewsize = 1; // ratio of the preview image. 0 is displayed based on the fixed width and height, and others are displayed in proportion.Private $ imgwidth = 200; // fixed width of the preview imagePrivate $ imgheight = 200; // fixed height of the preview image// ++ ++ ++Private $ imgthu = 1; // whether to generate and save the thumbnail. 1 is generated, and 0 is not generated.Private $ imgthu_fold
What is the thumbnail preview feature?
2345 look at the thumbnail preview provided by the King, so that you can directly in the Diagram window to preview all the pictures in the current directory, more convenient to switch pictures. Using the view to open a single picture, and the picture in the same directory, so the picture will default to the form of thumbnails in the 2345 look at the bottom of the Wang
The computer will store a variety of pictures or movie videos and other documents, the Windows system has a thumbnail feature that allows you to preview the thumbnail state so that you can better manage and use these files, but recently a user has encountered a problem with a thumbnail display that is garbled or not displayed correctly on the WIN8 system (as show
Phpcms V9 is currently the largest number of domestic use of an open source free CMS system, it is because of his free sex, open source, and its own functional relatively strong, so many webmaster friends of the pro, as well as many companies like. Phpcms also in order to improve the procedural loopholes, the official staff will regularly release some of the program patches, let users use. Prevent some special groups, through the loopholes of the program to attack other people's website. But thi
Win7 system has a unique function, called "taskbar thumbnail": That is, move the mouse to the taskbar icon will show preview thumbnail effect. But do not know what set up, the effect is gone, how to find it back? Let's see how to set up the fate of small series!
1. Press the shortcut key "Win+r" on the keyboard and enter "Gpedit.msc" to open Group Policy, as shown in Figure 1
Figure 1 Opening Group
Implementation principle:
1. What we're going to do now is customize the Web control, which is fundamentally different from the usual design of ASPX Web pages or user controls, custom controls is a class that derives from System.Web.WebControls.WebControl, it is a class, not the HTML code you imagine, and even in a custom control you can't find any style of HTML at all. Therefore, you have to design a very large number of classes, or, jump out of the design of the HTML circle, expand the mind!
Intelligent php thumbnail generation program. This is a thumbnail effect that can automatically detect your image size and generate an equal proportion. if you need it, refer to the following. The code is as follows: * author: Luo mengscorpio (this is a thumbnail that can automatically detect your image size and generate an equal proportion. if you need it, refer
First, IntroductionWindows Thumbnail handler is a set of COM interfaces that are used under the Windows platform to provide a content preview of the associated file types. By implementing thumbnail-related COM interfaces, you can provide a preview of the content for a custom file format. As shown in the following:Thumbnail handler is registered in the form of COM components. So, if we want to develop a
1PublicvoidImgsize ()2{3//In this example, two variables are assumed:45 String src ="C:/myimages/a.jpg";//Absolute path to the source image file6 String dest ="C:/myimages/a_th.jpg";//The absolute path of the generated thumbnail image file78int thumbwidth =132;//The width of the thumbnail to be generated9int thumbheight =100;//The height of the thumbnail to be ge
Php generates a thumbnail code. For more information, see. the transfer process is relatively long because the image data volume is large, you often want to display a thumbnail of an image. although you can scale the image at will by specifying the width and height of the image in HTML, this method does not reduce the number of pixels of the image. The size of the image file has not changed, and of course t
Believe that the large in the development of the problem of poor thumbnail quality, this article mainly introduces PHP generated thumbnail quality solution, has a certain value for reference, the need for friends can refer to, hope to help everyone.
Recently get a forum, on the first page to have a ranking, showing the top 10 users of the list of comments, the list has a sketch is the user's latest upload
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.