bardoqi/image-splitter

Split large images into m x n equal-sized small pieces.

1.3.1 2019-09-28 16:28 UTC

This package is auto-updated.

Last update: 2024-10-29 05:17:11 UTC


README

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

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.