提交 cf9fe80d 编写于 作者: A Anthony Najjar Simon

Fix outdated docs

上级 f0f3bd59
......@@ -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")
//
......
......@@ -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() {
......@@ -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)
......
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册