File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change 1+ # imgman
2+
3+ This library uses GD and EXIF (optional) PHP extensions so make sure you have them
4+
5+ Install:
6+ ```
7+ composer require leongrdic/imgman
8+ ```
9+
10+
11+ Example usages:
12+ ```
13+ use Le\ImgMan\{ImgMan, ImageFormat};
14+
15+ $img = new ImgMan()
16+ ->fromDataUrl($dataUrlFromJS)
17+ ->cacheExif()
18+ ->downscale(2048)
19+ ->rotateFromExif()
20+ ->output(ImageFormat::jpeg, 75)
21+ ->toString();
22+ ```
23+
24+ ```
25+ use Le\ImgMan\{ImgMan, ImageFormat};
26+
27+ new ImgMan()
28+ ->fromFile('example.png')
29+ ->downscale(1024)
30+ ->output(ImageFormat::webp, 80)
31+ ->toFile('example.webp');
32+ ```
33+
34+ ```
35+ use Le\ImgMan\{ImgMan, ImageFormat};
36+
37+ new ImgMan()
38+ ->fromString($rawImageBytes)
39+ ->output(ImageFormat::png, 80)
40+ ->toFile('example.png');
41+ ```
42+
43+ # Notice
44+
45+ This library hasn't yet been fully tested and is to be used at your own responsibility.
46+ Any feedback and improvement suggestions are appreciated!
You can’t perform that action at this time.
0 commit comments