Recently, I need an interface for online screenshots, but I haven’t found it suitable for a long time, and then It is a little troublesome to write it by myself. Suddenly, I remember that I encountered a slightly thumbnail class when I was using wordpress. Don’t use it too easily. I recommend it here.
Anyone who has used the Timthumb class should be familiar with it. This class can be used to generate and process thumbnails of images, or to take screenshots of websites if you have optipng or pngCrush installed in a Linux environment.
File download address: http://www.121xz.com/softdown/19577
Wordpress comes every time to upload the features of the thumbnails of all images by cutting according to set the image size, and cut the original image and the image stored in the web space, image cut only once, change the Settings of the size will not regenerate, so not only occupy the host space, after revision sites use the same images, even when otherwise image distortion or deformation. Timthumb. PHP is a thumbnail application project integrated in wordpress theme specially developed for wordpress. It will only crop the called images, and only generate a configuration file temporarily when there is an access request.
Parameter description:
SRC: the need for image zooming source address, or the need for screenshots operation web address webshot: if this value is true, for screenshots operation w: generate the width of the image, if the width or height only set up a value, according to one of the values for geometric scaling of h: the height of the generated images, if the height and width is not specified, the default is 100 * 100 zc: generate picture zoom mode, optional value of 0, 1, 2, 3, the default is 1, the difference between each value annotation line 100 q can see the following documents: Generated images quality, the default 90 a: beyond the cutting location of parts, and zooming pattern, optional value t, b, l, r, the default is cut from the top to f: need to generate images after use some filters, here are the different code and the value of the filter, the specific operation method is the line 821 annotations file below s: whether to sharpen the production pictures of cc: generating background canvas picture color ct: generate PNG image background is transparent
Warm tips:
Timthumb requires host support for GD libraries; The processing of Timthumb requires certain server resources. Timthumb does not support external linked images; There have been holes in Timthumb; The author indicates that Timthumb is no longer updated.
Patch the bugs in Timthumb. PHP:
Whitelists are removed using the latest version of timthumb. PHP (but the author says no more updates) server directory permissions Settings
Find the following code in the file, delete or comment it out
Anyone who has used the Timthumb class should be familiar with it. This class can be used to generate and process thumbnails of images, or to take screenshots of websites if you have optipng or pngCrush installed in a Linux environment.
File download address: http://www.121xz.com/softdown/19577
Wordpress comes every time to upload the features of the thumbnails of all images by cutting according to set the image size, and cut the original image and the image stored in the web space, image cut only once, change the Settings of the size will not regenerate, so not only occupy the host space, after revision sites use the same images, even when otherwise image distortion or deformation. Timthumb. PHP is a thumbnail application project integrated in wordpress theme specially developed for wordpress. It will only crop the called images, and only generate a configuration file temporarily when there is an access request.
Parameter description:
SRC: the need for image zooming source address, or the need for screenshots operation web address webshot: if this value is true, for screenshots operation w: generate the width of the image, if the width or height only set up a value, according to one of the values for geometric scaling of h: the height of the generated images, if the height and width is not specified, the default is 100 * 100 zc: generate picture zoom mode, optional value of 0, 1, 2, 3, the default is 1, the difference between each value annotation line 100 q can see the following documents: Generated images quality, the default 90 a: beyond the cutting location of parts, and zooming pattern, optional value t, b, l, r, the default is cut from the top to f: need to generate images after use some filters, here are the different code and the value of the filter, the specific operation method is the line 821 annotations file below s: whether to sharpen the production pictures of cc: generating background canvas picture color ct: generate PNG image background is transparent
Warm tips:
Timthumb requires host support for GD libraries; The processing of Timthumb requires certain server resources. Timthumb does not support external linked images; There have been holes in Timthumb; The author indicates that Timthumb is no longer updated.
Patch the bugs in Timthumb. PHP:
Whitelists are removed using the latest version of timthumb. PHP (but the author says no more updates) server directory permissions Settings
Find the following code in the file, delete or comment it out
1 2 3 4 5 6 7 8 |
// external domains that are allowed to be displayed on your website $allowedSites = array ( 'flickr.com', 'picasa.com', 'blogger.com', 'wordpress.com', 'img.youtube.com', ); |
Read More:
- Solve the problem of “A TimThumb error has occured” in the WordPress program
- PHP link database error PHP_ network_ getaddresses: getaddrinfo failed: Name or service not known
- PHP message: PHP Fatal error: Uncaught PDOException: SQLSTATE[08004] [1040] Too many connections
- After upgrading php7, PHP program prompts an error: operator not supported for strings in causes and Solutions
- php open(/var/lib/php/session/sess_4ofxxx, O_RDWR) failed: Permission denied (13)
- PHP – PHP Error[2]: Error while sending QUERY packet. PID=*
- How to generate PDF by C #
- How to generate UML Diagrams from Java code in Eclipse
- How to generate and view SSH keys in Ubuntu 16.04
- How to generate main () method in java graphical interface
- Wechat third party authorization to generate QR code API
- Traversing the background data to generate tree structure
- The least files needed to generate mesh using snappyhexmesh in openfoam
- MySQL — initialize failed to generate temporary password in error log after initialization
- Vs compile VTK, only generate install error, stop, ask God how to solve?
- [JS] use date. Now(). Tostring() to generate serial number
- 26 English letters in upper and lower case and 0-9 to generate 8-bit random password
- Python calls C to generate so library and reports an error: undefined symbol
- [wechat Payment] use OpenSSL command to generate apicclient_ key.pem Error report URL error 58
- VMware Virtualcenter failed firstboot. Failed to generate Virtu when installing vCenter6.7 on Windows Server 2008R2