Skip to content

Commit

Permalink
added readme
Browse files Browse the repository at this point in the history
  • Loading branch information
leongrdic committed Jan 26, 2022
1 parent 77dba88 commit 360aa60
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# imgman

This library uses GD and EXIF (optional) PHP extensions so make sure you have them

Install:
```
composer require leongrdic/imgman
```


Example usages:
```
use Le\ImgMan\{ImgMan, ImageFormat};
$img = new ImgMan()
->fromDataUrl($dataUrlFromJS)
->cacheExif()
->downscale(2048)
->rotateFromExif()
->output(ImageFormat::jpeg, 75)
->toString();
```

```
use Le\ImgMan\{ImgMan, ImageFormat};
new ImgMan()
->fromFile('example.png')
->downscale(1024)
->output(ImageFormat::webp, 80)
->toFile('example.webp');
```

```
use Le\ImgMan\{ImgMan, ImageFormat};
new ImgMan()
->fromString($rawImageBytes)
->output(ImageFormat::png, 80)
->toFile('example.png');
```

# Notice

This library hasn't yet been fully tested and is to be used at your own responsibility.
Any feedback and improvement suggestions are appreciated!

0 comments on commit 360aa60

Please sign in to comment.