Skip to content

skh6075/ImageResize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ImageResize

PocketMine-MP virion that resize image size

Installation

Download Zip

Usage

The image converter tool has the ability to resize images.
Supported image formats are png, jpg, and gif.

Called the class to resize the image

use skh6075\lib\imageresize\ImageResize;

Get the image path and called the converter.

$converter = ImageResize::converter(string $imagePath);

After writing down the size to be adjusted and the path to save the adjusted image,
call the resizing method.

$converter->resizing(string $destPath, int $width, int $height);

This is a method to check the image adjustment result for developers.

use skh6075\lib\imageresize\convert\utils\ImageResizeResult;

switch($converter){
    case ImageResizeResult::SUCCESS():
        echo "Image resizing success";
        break;
    case ImageResizeResult::FAILURE():
        echo "Image resizing failure";
        break;
    case ImageResizeResult::NONE():
        echo "Prepare for image resizing";
        break;
}

About

PocketMine-MP virion that resize image size

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages