]> Cypherpunks repositories - gostls13.git/commit
image/jpeg: send a correct Start Of Scan (SOS) header.
authorNigel Tao <nigeltao@golang.org>
Tue, 7 Aug 2012 23:57:09 +0000 (09:57 +1000)
committerNigel Tao <nigeltao@golang.org>
Tue, 7 Aug 2012 23:57:09 +0000 (09:57 +1000)
commit5f7bec693d3d383061586d6f29f4fea2648399a7
tree826db1969d62b6da73c0e36d46137e7e94aaf667
parent0157c72d133471631c13419f61117b75dcd7c255
image/jpeg: send a correct Start Of Scan (SOS) header.

Section B.2.3 of http://www.w3.org/Graphics/JPEG/itu-t81.pdf discusses
the End of spectral selection (Se) byte.

Apparently many JPEG decoders ignore the Se byte (or let it through
with a warning), but some configurations reject them. For example,
http://download.blender.org/source/chest/blender_2.03_tree/jpeg/jcmaster.c
has these lines:

if (Ss != 0 || Se != DCTSIZE2-1 || Ah != 0 || Al != 0)
  ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);

Fixes #3916.

R=r
CC=golang-dev
https://golang.org/cl/6459052
src/pkg/image/jpeg/writer.go