Skip to content

Commit

Permalink
Fix readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ksubileau committed Mar 12, 2022
1 parent 36de803 commit f905264
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ It's a PHP port of the [Color Thief Javascript library](http://github.com/lokesh

## Requirements

- PHP >= PHP 7.2 or >= PHP 8.0
- PHP >= 7.2 or >= PHP 8.0
- Fileinfo extension
- One or more PHP extensions for image processing:
- GD >= 2.0
- Imagick >= 2.0 (but >= 3.0 for CMYK images)
- Gmagick >= 1.0
- Supports JPEG, PNG and GIF images.
- Supports JPEG, PNG, GIF and WEBP images.

## How to use
### Install via Composer
Expand All @@ -43,8 +43,6 @@ The `$sourceImage` variable must contain either the absolute path of the image o
ColorThief::getColor($sourceImage[, $quality=10, $area=null, $outputFormat='array', $adapter = null])
```

This function returns an array of three integer values, corresponding to the RGB values (Red, Green & Blue) of the dominant color.

You can pass an additional argument (`$quality`) to adjust the calculation accuracy of the dominant color. 1 is the highest quality settings, 10 is the default. But be aware that there is a trade-off between quality and speed/memory consumption !
If the quality settings are too high (close to 1) relative to the image size (pixel counts), it may **exceed the memory limit** set in the PHP configuration (and computation will be slow).

Expand Down

0 comments on commit f905264

Please sign in to comment.