Documentation updated to new function signature

This commit is contained in:
jst 2012-08-08 21:39:51 +02:00
parent 14d51db8b4
commit a2154d46c5

View File

@ -21,10 +21,10 @@ Import package with
import "github.com/nfnt/resize" import "github.com/nfnt/resize"
``` ```
Resize creates a scaled image with new dimensions (w,h) using the interpolation function interp. Resize creates a scaled image with new dimensions (width, height) using the interpolation function interp.
```go ```go
resize.Resize(w int, h int, img image.Image, interp resize.InterpolationFunction) image.Image resize.Resize(width, height int, img image.Image, interp resize.InterpolationFunction) image.Image, error
``` ```
The provided interpolation functions are The provided interpolation functions are
@ -60,7 +60,10 @@ func main() {
file.Close() file.Close()
// resize to width 1000 using Lanczos resampling // resize to width 1000 using Lanczos resampling
m := resize.Resize(1000, -1, img, resize.Lanczos3) m, err := resize.Resize(1000, -1, img, resize.Lanczos3)
if err != nil {
return
}
out, err := os.Create("test_resized.jpg") out, err := os.Create("test_resized.jpg")
if err != nil { if err != nil {