]> Cypherpunks repositories - gostls13.git/commit
image/jpeg: handle those (unusual) grayscale images whose sampling
authorNigel Tao <nigeltao@golang.org>
Mon, 7 Jan 2013 05:16:11 +0000 (16:16 +1100)
committerNigel Tao <nigeltao@golang.org>
Mon, 7 Jan 2013 05:16:11 +0000 (16:16 +1100)
commit30ff0636b77f0e64084cc976e927355edb6d6f36
tree236ea179fbeb6b543224d9222d5fe3dd27e343d1
parent86aad668c0022f17a202fc8d4dd76a0456401048
image/jpeg: handle those (unusual) grayscale images whose sampling
ratio isn't 1x1.

Fixes #4259.

The test data was generated by
cjpeg -quality 50 -sample 2x2 video-005.gray.pgm > video-005.gray.q50.2x2.jpeg
cjpeg -quality 50 -sample 2x2 -progressive video-005.gray.pgm > video-005.gray.q50.2x2.progressive.jpeg

similarly to video-005.gray.q50.* from
http://code.google.com/p/go/source/detail?r=51f26e36ba98
the key difference being the "-sample 2x2".

R=rsc
CC=golang-dev
https://golang.org/cl/7069045
src/pkg/image/jpeg/reader.go
src/pkg/image/jpeg/reader_test.go
src/pkg/image/testdata/video-005.gray.q50.2x2.jpeg [new file with mode: 0644]
src/pkg/image/testdata/video-005.gray.q50.2x2.progressive.jpeg [new file with mode: 0644]