Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] improve documentation #106

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
31 changes: 31 additions & 0 deletions examples/crop_pad.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?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) 2014, Marcel Domke
*
* Author(s): Marcel Domke <[email protected]>
*
* Licensed under the MIT License
* Redistributions of files must retain the above copyright notice.
*
* @author Marcel Domke <[email protected]>
* @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();
33 changes: 33 additions & 0 deletions examples/image_filter.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?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) 2014, Marcel Domke
*
* Author(s): Marcel Domke <[email protected]>
*
* Licensed under the MIT License
* Redistributions of files must retain the above copyright notice.
*
* @author Marcel Domke <[email protected]>
* @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();
31 changes: 31 additions & 0 deletions examples/resize_adaptive_quadrant.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?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) 2014, Marcel Domke
*
* Author(s): Marcel Domke <[email protected]>
*
* Licensed under the MIT License
* Redistributions of files must retain the above copyright notice.
*
* @author Marcel Domke <[email protected]>
* @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();