-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
image/png: don't read filter bytes for empty interlace passes.
Fixes golang#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 <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]>
- Loading branch information
Showing
4 changed files
with
27 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.