Skip to content

Commit

Permalink
Merge pull request anthonynsimon#83 from anthonynsimon/update-docs
Browse files Browse the repository at this point in the history
Fix outdated docs
  • Loading branch information
anthonynsimon committed May 10, 2020
2 parents f0f3bd5 + cf9fe80 commit 5ea8924
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion imgio/io.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type Encoder func(io.Writer, image.Image) error
// Open loads and decodes an image from a file and returns it.
//
// Usage example:
// // Encode an image to a writer in PNG format,
// // Decodes an image from a file with the given filename
// // returns an error if something went wrong
// img, err := Open("exampleName")
//
Expand Down
4 changes: 2 additions & 2 deletions transform/resize.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
//
// Usage example:
//
// result := bild.Resize(img, 800, 600, bild.Linear)
// result := transform.Resize(img, 800, 600, transform.Linear)
//
func Resize(img image.Image, width, height int, filter ResampleFilter) *image.RGBA {
if width <= 0 || height <= 0 || img.Bounds().Empty() {
Expand All @@ -42,7 +42,7 @@ func Resize(img image.Image, width, height int, filter ResampleFilter) *image.RG
//
// Usage example:
//
// result := bild.Crop(img, image.Rect(0,0,512,256))
// result := transform.Crop(img, image.Rect(0, 0, 512, 256))
//
func Crop(img image.Image, rect image.Rectangle) *image.RGBA {
src := clone.AsRGBA(img)
Expand Down
2 changes: 1 addition & 1 deletion transform/rotate.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ type RotationOptions struct {
// Usage example:
//
// // Rotate 90.0 degrees clockwise, preserving the image size and the pivot point at the top left corner
// result := bild.Rotate(img, 90.0, &bild.RotationOptions{PreserveSize: true, Pivot: &image.Point{0, 0}})
// result := transform.Rotate(img, 90.0, &transform.RotationOptions{ResizeBounds: true, Pivot: &image.Point{0, 0}})
//
func Rotate(img image.Image, angle float64, options *RotationOptions) *image.RGBA {
src := clone.AsRGBA(img)
Expand Down

0 comments on commit 5ea8924

Please sign in to comment.