From 902345e596d71bf728d20a587777e98147387412 Mon Sep 17 00:00:00 2001 From: Rob Pike Date: Tue, 14 Jul 2015 15:20:19 +1000 Subject: [PATCH] doc: document behavior change in image/color in release notes Change-Id: I7ad90ab78abb8a39d56c837610d5c311a96b7039 Reviewed-on: https://go-review.googlesource.com/12162 Reviewed-by: Nigel Tao --- doc/go1.5.html | 37 ++++++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/doc/go1.5.html b/doc/go1.5.html index 493209df1dc..c54d4ce3160 100644 --- a/doc/go1.5.html +++ b/doc/go1.5.html @@ -197,7 +197,7 @@ In prior releases it defaulted to 1. Programs that do not expect to run with multiple cores may break inadvertently. They can be updated by removing the restriction or by setting -GOMAXPROCS explicitly. +GOMAXPROCS explicitly.

Build

@@ -334,7 +334,7 @@ configure the architecture and operating system. Unlike the other programs, the assembler is a wholly new program written in Go.

- +

The new assembler is very nearly compatible with the previous ones, but there are a few changes that may affect some @@ -479,7 +479,7 @@ as described above.

  • An -asmflags build option has been added to provide flags to the assembler. -However, +However, the -ccflags build option has been dropped; it was specific to the old, now deleted C compiler .
  • @@ -585,7 +585,7 @@ and associated video.

    The flag package's -PrintDefaults +PrintDefaults function, and method on FlagSet, have been modified to create nicer usage messages. The format has been changed to be more human-friendly and in the usage @@ -814,7 +814,7 @@ to select a certificate for the connection when none is supplied. Finally, the session ticket keys in the crypto/tls package can now be rotated (changed periodically during an active connection). -This is done through the new +This is done through the new SetSessionTicketKeys method of the Config type. @@ -931,6 +931,29 @@ the CMYKModel color model needed by some JPEG images. +

  • +Also in the image/color package, +the conversion of a YCbCr +value to RGBA has become more precise. +Previously, the low 8 bits were just an echo of the high 8 bits; +now they contain more accurate information. +Because of the echo property of the old code, the operation +uint8(r) to extract an 8-bit red vaue worked, but is incorrect. +In Go 1.5, that operation may yield a different value. +The correct code is, and always was, to select the high 8 bits: +uint8(r>>8). +Incidentally, image/draw package +provides better support for such conversions; see +this blog post +for more information. +
  • + +
  • +Finally, as of Go 1.5 the closest match check in +Index +now honors the alpha channel. +
  • +
  • The image/gif package includes a couple of generalizations. @@ -996,7 +1019,7 @@ Go 1.5's net package adds RFC-6555-compliant dialing for sites with multiple TCP addresses listed in DNS. A new DualStack field -in Dialer enables the feature. +in Dialer enables the feature.
  • @@ -1141,7 +1164,7 @@ The default, which can now be overridden, is as before: to continue with an inva
  • The time package's Time type has a new method -AppendFormat, +AppendFormat, which can be used to avoid allocation when printing a time value.