]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1] image/jpeg: send a correct Start Of Scan (SOS) header.
authorNigel Tao <nigeltao@golang.org>
Fri, 21 Sep 2012 19:54:32 +0000 (05:54 +1000)
committerNigel Tao <nigeltao@golang.org>
Fri, 21 Sep 2012 19:54:32 +0000 (05:54 +1000)
commitda6a2756c8f51372186f2445cc63a1b8cb0450b4
tree0b404f111c2ff95e7459f81f4b826177dde24eb5
parent602c9220957d3b846b907fc1a764adb1f4e27b0b
[release-branch.go1] image/jpeg: send a correct Start Of Scan (SOS) header.

««« backport 4a67b1f1e771
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