]> Cypherpunks repositories - gostls13.git/commit
image/png: allow tRNS chunk without a PLTE chunk.
authorNigel Tao <nigeltao@golang.org>
Thu, 27 Oct 2016 02:36:48 +0000 (13:36 +1100)
committerNigel Tao <nigeltao@golang.org>
Thu, 27 Oct 2016 02:59:31 +0000 (02:59 +0000)
commitde4b06559119eac499906aaa4d42046b3beed52d
treeb618fb7deaf8dc1e0f322079f4f3ac7e3ca56263
parent645e984f39a6cf0ffdf965dc04130d9c7f57e8a4
image/png: allow tRNS chunk without a PLTE chunk.

While https://www.w3.org/TR/PNG/#5ChunkOrdering says that tRNS's
ordering constraint is "After PLTE; before IDAT", it is legal for a tRNS
chunk to occur without a PLTE chunk at all, for greyscale and truecolor
transparency as opposed to palette-based transparency. See
https://www.w3.org/TR/PNG/#11transinfo

Fixes #17511.

Change-Id: I047b0b01d78a1cda65e00eeac229bb972cda431d
Reviewed-on: https://go-review.googlesource.com/32139
Reviewed-by: Rob Pike <r@golang.org>
src/image/png/reader.go