|
@@ -13,14 +13,14 @@ as an input, and return a new image of `*image.NRGBA` type (32bit RGBA colors, n
|
|
|
## Installation
|
|
|
|
|
|
go get -u github.com/disintegration/imaging
|
|
|
-
|
|
|
+
|
|
|
## Documentation
|
|
|
|
|
|
http://godoc.org/github.com/disintegration/imaging
|
|
|
|
|
|
## Usage examples
|
|
|
|
|
|
-A few usage examples can be found below. See the documentation for the full list of supported functions.
|
|
|
+A few usage examples can be found below. See the documentation for the full list of supported functions.
|
|
|
|
|
|
### Image resizing
|
|
|
|
|
@@ -60,7 +60,7 @@ From faster (lower quality) to slower (higher quality):
|
|
|
|
|
|
Filter | Resize result
|
|
|
--------------------------|---------------------------------------------
|
|
|
-`imaging.NearestNeighbor` | 
|
|
|
+`imaging.NearestNeighbor` | 
|
|
|
`imaging.Linear` | 
|
|
|
`imaging.CatmullRom` | 
|
|
|
`imaging.Lanczos` | 
|
|
@@ -120,6 +120,16 @@ Original image | Brightness = 10
|
|
|
-----------------------------------|----------------------------------------------|---------------------------------------------
|
|
|
 |  | 
|
|
|
|
|
|
+### Saturation adjustment
|
|
|
+
|
|
|
+```go
|
|
|
+dstImage := imaging.AdjustSaturation(srcImage, 20)
|
|
|
+```
|
|
|
+
|
|
|
+Original image | Saturation = 30 | Saturation = -30
|
|
|
+-----------------------------------|----------------------------------------------|---------------------------------------------
|
|
|
+ |  | 
|
|
|
+
|
|
|
## Example code
|
|
|
|
|
|
```go
|
|
@@ -185,4 +195,4 @@ func main() {
|
|
|
|
|
|
Output:
|
|
|
|
|
|
-
|
|
|
+
|