bardoqi / image-splitter
Split large images into m x n equal-sized small pieces.
Requires
- php: ~7.0
Requires (Dev)
- phpunit/phpunit: ^5.6
- squizlabs/php_codesniffer: ^2.7
README
Split large images into m x n equal-sized small pieces.
Introduction
Split large images into m x n equal-sized small pieces.
Install
Via Composer
$ composer require bardoqi/image-splitter
Usage
use ImageSplitter\ImageSplitter; use ImageSplitter\ImageSplitterException; try{ ImageSplitter::getInstance($row_count,$col_count,$output_path,$output_type) ->splitToTile($src_filename,$file_prefix); }catch(ImageSplitterException $e){ // Write your logFile; }
Features
This library supports the following image_type:
-
Png
-
Gif
-
Jpeg, Jpg
This library supports the parameters of config
-
$row_count: The count of rows of the new image files.
-
$col_count: The count of columns of the new image files.
-
$output_path: The output path of the new image files.
-
$output_type: The output type of the new image files, available values are IMAGETYPE_PNG, IMAGETYPE_JPEG and IMAGETYPE_GIF. default value: IMAGETYPE_PNG
Change log
Please see CHANGELOG for more information what has changed recently.
Testing
$ composer test
Contributing
Please see CONTRIBUTING and CONDUCT for details.
Security
If you discover any security related issues, please create an issue in the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.