aboutsummaryrefslogtreecommitdiff
path: root/src/database/sql/sql_test.go
diff options
context:
space:
mode:
authorNigel Tao <nigeltao@golang.org>2016-10-20 16:57:55 +1100
committerNigel Tao <nigeltao@golang.org>2016-10-20 22:27:28 +0000
commit584e3ea2581c858688803d41e207eeaa881a2a85 (patch)
tree71635a63af3fd64d3f8fc7de1683714100222e00 /src/database/sql/sql_test.go
parenta190f3c8a34b859dd578b1d30b48ecd04c7a99c7 (diff)
downloadgo-584e3ea2581c858688803d41e207eeaa881a2a85.tar.xz
image/color: tweak the formula for converting to gray.
This makes grayModel and gray16Model in color.go use the exact same formula as RGBToYCbCr in ycbcr.go. They were the same formula in theory, but in practice the color.go versions used a divide by 1000 and the ycbcr.go versions used a (presumably faster) shift by 16. This implies the nice property that converting an image.RGBA to an image.YCbCr and then taking only the Y channel is equivalent to converting an image.RGBA directly to an image.Gray. The difference between the two formulae is non-zero, but small: https://play.golang.org/p/qG7oe-eqHI Updates #16251 Change-Id: I288ecb957fd6eceb9626410bd1a8084d2e4f8198 Reviewed-on: https://go-review.googlesource.com/31538 Reviewed-by: Rob Pike <r@golang.org>
Diffstat (limited to 'src/database/sql/sql_test.go')
0 files changed, 0 insertions, 0 deletions