<?php /** * PhpThumb Library Example File * * This file contains example usage for the PHP Thumb Library * * PHP Version 5 with GD 2.0+ * PhpThumb : PHP Thumb Library <http://phpthumb.gxdlabs.com> * Copyright (c) 2009, Ian Selby/Gen X Design * * Author(s): Ian Selby <*****@*****.**> * * Licensed under the MIT License * Redistributions of files must retain the above copyright notice. * * @author Ian Selby <*****@*****.**> * @copyright Copyright (c) 2009 Gen X Design * @link http://phpthumb.gxdlabs.com * @license http://www.opensource.org/licenses/mit-license.php The MIT License * @version 3.0 * @package PhpThumb * @subpackage Examples * @filesource */ require_once '../vendor/autoload.php'; $thumb = new PHPThumb\GD(__DIR__ . '/../tests/resources/test.jpg'); $thumb->resizePercent(50); $thumb->show();
<?php /** * PhpThumb Library Example File * * This file contains example usage for the PHP Thumb Library * * PHP Version 5 with GD 2.0+ * PhpThumb : PHP Thumb Library <http://phpthumb.gxdlabs.com> * Copyright (c) 2009, Ian Selby/Gen X Design * * Author(s): Ian Selby <*****@*****.**> * * Licensed under the MIT License * Redistributions of files must retain the above copyright notice. * * @author Oleg Sherbakov <*****@*****.**> * @copyright Copyright (c) 2016 * @license http://www.opensource.org/licenses/mit-license.php The MIT License * @version 3.0 * @package PhpThumb * @subpackage Examples * @filesource */ require_once '../vendor/autoload.php'; $watermark = new PHPThumb\GD(__DIR__ . '/../tests/resources/test.jpg'); $thumb = new PHPThumb\GD(__DIR__ . '/../tests/resources/test.jpg', array(), array(new PHPThumb\Plugins\Watermark($watermark->resizePercent(20), 'center', 50, 0, 0))); $thumb->show();