From 7571a7331a194e519752d7591472f5f282643c2b Mon Sep 17 00:00:00 2001 From: Marcel Domke Date: Fri, 14 Feb 2014 16:04:10 +0100 Subject: [PATCH] * added new example pages * PHPThumb::pad() * PHPThumb::imageFilter() * PHPThumb::adaptiveResizeQuadrant() * Removed broken links in README.md --- README.md | 9 +------- examples/crop_pad.php | 31 +++++++++++++++++++++++++ examples/image_filter.php | 33 +++++++++++++++++++++++++++ examples/resize_adaptive_quadrant.php | 31 +++++++++++++++++++++++++ 4 files changed, 96 insertions(+), 8 deletions(-) create mode 100644 examples/crop_pad.php create mode 100644 examples/image_filter.php create mode 100644 examples/resize_adaptive_quadrant.php diff --git a/README.md b/README.md index d1becab..7fbc7e2 100644 --- a/README.md +++ b/README.md @@ -16,16 +16,9 @@ It also features the ability to perform multiple manipulations per instance (also known as chaining), without the need to save and re-initialize the class with every manipulation. -More information and documentation is available at the project's wiki: [https://github.com/masterexploder/PHPThumb/wiki](https://github.com/masterexploder/PHPThumb/wiki) - ## Documentation / Help -I've tried to thoroughly document things as best I can, but here's a list of places to -find documentation / help: - -- [Documentation](http://wiki.github.com/iselby/PHPThumb/) - Your best friend, the library docs -- [Forums](http://phpthumb.gxdlabs.com/forums) - Got questions, comments, or feedback? This is the place to visit -- [Developer Docs](http://phpthumb.gxdlabs.com/apidocs) - Auto-generated docs for developers… these cover the code itself +- [Documentation](https://github.com/masterexploder/PHPThumb/wiki) - Your best friend, the library docs ## License diff --git a/examples/crop_pad.php b/examples/crop_pad.php new file mode 100644 index 0000000..c123152 --- /dev/null +++ b/examples/crop_pad.php @@ -0,0 +1,31 @@ + + * Copyright (c) 2014, Marcel Domke + * + * Author(s): Marcel Domke + * + * Licensed under the MIT License + * Redistributions of files must retain the above copyright notice. + * + * @author Marcel Domke + * @copyright Copyright (c) 2014 Marcel Domke + * @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->pad(1024, 350, array(192, 212, 45)); + +$thumb->show(); diff --git a/examples/image_filter.php b/examples/image_filter.php new file mode 100644 index 0000000..c5373fc --- /dev/null +++ b/examples/image_filter.php @@ -0,0 +1,33 @@ + + * Copyright (c) 2014, Marcel Domke + * + * Author(s): Marcel Domke + * + * Licensed under the MIT License + * Redistributions of files must retain the above copyright notice. + * + * @author Marcel Domke + * @copyright Copyright (c) 2014 Marcel Domke + * @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'); +// for more informations visit http://www.php.net/manual/de/function.imagefilter.php +$thumb->imageFilter(IMG_FILTER_COLORIZE, 160, 20, 20); +// or e.g. $thumb->imageFilter(IMG_FILTER_GRAYSCALE); + +$thumb->show(); diff --git a/examples/resize_adaptive_quadrant.php b/examples/resize_adaptive_quadrant.php new file mode 100644 index 0000000..e5f402a --- /dev/null +++ b/examples/resize_adaptive_quadrant.php @@ -0,0 +1,31 @@ + + * Copyright (c) 2014, Marcel Domke + * + * Author(s): Marcel Domke + * + * Licensed under the MIT License + * Redistributions of files must retain the above copyright notice. + * + * @author Marcel Domke + * @copyright Copyright (c) 2014 Marcel Domke + * @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->adaptiveResizeQuadrant(300, 300, 'C'); + +$thumb->show();