This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This code is an improvement over Alex's code that can be found here -> http://stackoverflow.com/a/11376379 | |
* | |
* This funtion creates a thumbnail with size $thumbnail_width x $thumbnail_height. | |
* It supports JPG, PNG and GIF formats. The final thumbnail tries to keep the image proportion. | |
* | |
* It has been pointed out that if the thumbnail already exists it doesn't get overwritten, but the method still returns true. | |
* so keep an eye on that. | |
* |