ch10: fix code path

This commit is contained in:
chai2010
2016-01-20 23:08:50 +08:00
parent c683de9b81
commit 442dd58ee4
2 changed files with 2 additions and 3 deletions

View File

@@ -10,8 +10,8 @@ import _ "image/png" // register PNG decoder
標準庫的image圖像包包含了一個`Decode`函數,用於從`io.Reader`接口讀取數據併解碼圖像它調用底層註冊的圖像解碼器來完成任務然後返迴image.Image類型的圖像。使用`image.Decode`很容易編寫一個圖像格式的轉換工具,讀取一種格式的圖像,然後編碼爲另一種圖像格式:
<u><i>gopl.io/ch10/jpeg</i></u>
```Go
gopl.io/ch10/jpeg
// The jpeg command reads a PNG image from the standard input
// and writes it as a JPEG image to the standard output.
package main