Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pmmppluginsrepository/imageresize
PocketMine-MP virion that resize image size
https://github.com/pmmppluginsrepository/imageresize
pocketmine virion
Last synced: about 2 months ago
JSON representation
PocketMine-MP virion that resize image size
- Host: GitHub
- URL: https://github.com/pmmppluginsrepository/imageresize
- Owner: PMMPPluginsRepository
- License: mit
- Created: 2022-04-06T11:45:19.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-04-06T13:57:15.000Z (almost 3 years ago)
- Last Synced: 2024-10-09T23:04:15.763Z (3 months ago)
- Topics: pocketmine, virion
- Language: PHP
- Homepage:
- Size: 7.81 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ImageResize
PocketMine-MP virion that resize image size## Installation
[Download Zip](https://github.com/Melodylan/ImageResize/archive/refs/heads/main.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
```php
use skh6075\lib\imageresize\ImageResize;
```Get the image path and called the converter.
```php
$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.
```php
$converter->resizing(string $destPath, int $width, int $height);
```This is a method to check the image adjustment result for developers.
```php
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;
}
```