Skip to content

Commit 4b038bf

Browse files
committed
Update readme
1 parent 2b1d8b9 commit 4b038bf

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,16 @@ $instance->setBinaryPath("C:\\Users\\sdkca\\Desktop\\pngquant.exe")
2121

2222
# Installation
2323

24+
php-pngquant can be used either with or without Composer.
25+
2426
## With Composer
27+
28+
The preferred way to use php-pngquant is with Composer. Execute the following command to install this package as a dependency in your project:
29+
2530
```batch
2631
composer require ourcodeworld/php-pngquant
2732
```
33+
2834
## Without Composer
2935

3036
If you don't use composer, you can still use the wrapper. Download the [PNGQuant.php](https://github.com/ourcodeworld/php-pngquant/blob/master/src/PNGQuant.php) class from the repository and then use `require_once` to import it in your code:
@@ -36,13 +42,7 @@ require_once("PNGQuant.php");
3642

3743
$instance = new PNGQuant();
3844

39-
// Change the path to the binary of pngquant, for example in windows would be (with an example path):
40-
$output = $instance->setImage("image-original.png")
41-
->setOutputImage("image-compressed.png")
42-
// Overwrite output file if exists
43-
->overwriteExistingFile()
44-
->setQuality(50,80)
45-
->execute();
45+
// Configuration here ...
4646
```
4747
# Example
4848

@@ -78,7 +78,7 @@ For further information and examples of the wrapper, please [visit the official
7878
The MIT License (MIT)
7979
=====================
8080

81-
Copyright © `2017` `Our Code World`
81+
Copyright © 2017 Our Code World
8282

8383
Permission is hereby granted, free of charge, to any person
8484
obtaining a copy of this software and associated documentation

0 commit comments

Comments
 (0)