瀏覽代碼

Update docs

disintegration 13 年之前
父節點
當前提交
7559eecb63
共有 2 個文件被更改,包括 12 次插入8 次删除
  1. 5 5
      README.md
  2. 7 3
      imaging.go

+ 5 - 5
README.md

@@ -1,11 +1,11 @@
 # Imaging
 
-Simple Go image processing package. 
+Package imaging provides basic image manipulation functions as well as 
+simplified image loading and saving.
 
-Implements a number of basic image manipulation functions as well as simplified image loading, creation and saving. 
-All the image manipulation functions are not in-place, they return a new image with bounds (0, 0) - (Width, Height)
-This package integrates with standard "image" package well: most functions take image.Image interface as an argument 
-and return draw.Image interface.
+This package is based on the standard Go image package. All the image 
+manipulation functions provided by the package return a new `draw.Image`.
+Currently, `*image.RGBA` type is used to build new images.
 
 ### Installation
 

+ 7 - 3
imaging.go

@@ -1,5 +1,9 @@
-// Package imaging provides basic image manipulation functions.
-
+// Package imaging provides basic image manipulation functions as well as 
+// simplified image loading and saving.
+// 
+// This package is based on the standard Go image package. All the image 
+// manipulation functions provided by the package return a new draw.Image.
+// Currently, *image.RGBA type is used to build new images.
 package imaging
 
 import (
@@ -345,7 +349,7 @@ func Resize(img image.Image, width, height int) draw.Image {
 	radiusX := dx / 2.0
 	radiusY := dy / 2.0
 
-	// increase the radius of antialiasing a little to get more smooth result
+	// increase the radius of antialiasing a little to produce smoother output image
 	radiusX = math.Ceil(radiusX * 1.25)
 	radiusY = math.Ceil(radiusY * 1.25)