commit | ca6ba492690135647443817ba0d3ccb0c2f0de14 | [log] [tgz] |
---|---|---|
author | Nigel Tao <nigeltao@golang.org> | Sun Jul 12 21:02:13 2015 +1000 |
committer | Nigel Tao <nigeltao@golang.org> | Mon Jul 13 06:40:00 2015 +0000 |
tree | 60d2ab405bdc32036525ef96bf3d7c27ef813724 | |
parent | 616cb3c0eadada458358d69b1098a5aea9165099 [diff] |
image/png: don't read filter bytes for empty interlace passes. Fixes #11604 The gray-gradient.png image was created by a Go program: ---- package main import ( "image" "image/color" "image/png" "log" "os" ) func main() { f, err := os.Create("a.png") if err != nil { log.Fatal(err) } defer f.Close() m := image.NewGray(image.Rect(0, 0, 1, 16)) for i := 0; i < 16; i++ { m.SetGray(0, i, color.Gray{uint8(i * 0x11)}) } err = png.Encode(f, m) if err != nil { log.Fatal(err) } } ---- The equivalent gray-gradient.interlaced.png image was created via ImageMagick: $ convert -interlace PNG gray-gradient.png gray-gradient.interlaced.png As a sanity check: $ file gray-gradient.* gray-gradient.interlaced.png: PNG image data, 1 x 16, 4-bit grayscale, interlaced gray-gradient.png: PNG image data, 1 x 16, 8-bit grayscale, non-interlaced Change-Id: I7700284f74d1ea30073aede3bce4d7651787bdbc Reviewed-on: https://go-review.googlesource.com/12064 Reviewed-by: Rob Pike <r@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
For documentation about how to install and use Go, visit https://golang.org/ or load doc/install-source.html in your web browser.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Please report issues here: https://golang.org/issue/new
Go is the work of hundreds of contributors. We appreciate your help!
To contribute, please read the contribution guidelines: https://golang.org/doc/contribute.html
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
If you have just untarred a binary Go distribution, you need to set the environment variable $GOROOT to the full path of the go directory (the one containing this file). You can omit the variable if you unpack it into /usr/local/go, or if you rebuild from sources by running all.bash (see doc/install-source.html). You should also add the Go binary directory $GOROOT/bin to your shell's path.
For example, if you extracted the tar file into $HOME/go, you might put the following in your .profile:
export GOROOT=$HOME/go export PATH=$PATH:$GOROOT/bin
See https://golang.org/doc/install or doc/install.html for more details.