mirror of
https://github.com/Geckon01/simple-image-compressor.git
synced 2026-07-11 07:52:11 +00:00
Update README.md - fix some typo
This commit is contained in:
@@ -33,10 +33,10 @@ use geckon01\SimpleImageCompressor\SimpleImageCompressor;
|
|||||||
|
|
||||||
To resize and compress your image you can use next code:
|
To resize and compress your image you can use next code:
|
||||||
```php
|
```php
|
||||||
$resulutionTargetPercent = 50;
|
$resolutionTargetPercent = 50;
|
||||||
$targetQuality = 50;
|
$targetQuality = 50;
|
||||||
$compressor = SimpleImageCompressor::load("image.png");
|
$compressor = SimpleImageCompressor::load("image.png");
|
||||||
$compressedImage = $compressor->resizeAndCompress($resulutionTargetPercent, $targetQuality);
|
$compressedImage = $compressor->resizeAndCompress($resolutionTargetPercent, $targetQuality);
|
||||||
$compressedImage->toFile("image");
|
$compressedImage->toFile("image");
|
||||||
```
|
```
|
||||||
load method supports loading from local file, or you can specify any valid URL image link like this:
|
load method supports loading from local file, or you can specify any valid URL image link like this:
|
||||||
|
|||||||
Reference in New Issue
Block a user