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
<? | |
// Link image type to correct image loader and saver | |
// - makes it easier to add additional types later on | |
// - makes the function easier to read | |
const IMAGE_HANDLERS = [ | |
IMAGETYPE_JPEG => [ | |
'load' => 'imagecreatefromjpeg', | |
'save' => 'imagejpeg', | |
'quality' => 100 |