mirror of
https://github.com/nxshock/colorcrop.git
synced 2025-07-02 00:23:44 +05:00
Comparator rework and fixes
This commit is contained in:
parent
ab1c13e694
commit
eff44ff1cc
5 changed files with 117 additions and 16 deletions
|
@ -14,12 +14,18 @@ Import package with
|
|||
import "github.com/nxshock/colorcrop"
|
||||
```
|
||||
|
||||
Crop white borders with 50% of thresold:
|
||||
Crop **white** borders with **50%** of thresold:
|
||||
|
||||
```go
|
||||
croppedImage := colorcrop.Crop(sourceImage, color.RGBA{255, 255, 255, 255}, 0.5)
|
||||
```
|
||||
|
||||
You may use custom comparator of colors:
|
||||
|
||||
```go
|
||||
croppedImage := colorcrop.CropWithComparator(sourceImage, color.RGBA{255, 255, 255, 255}, 0.5, colorcrop.CmpCIE76)
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
See in "examples".
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue