From 2257e7670f35def119b43566e9e755a1432e9522 Mon Sep 17 00:00:00 2001
From: Rob Pike RawURL, which must be fixed by hand.
+The image package has had a number of
+minor changes, rearrangements and renamings.
+
+Most of the color handling code has been moved into its own package,
+image/color.
+For the elements that moved, a symmetry arises; for instance,
+each pixel of an
+image.RGBA
+is a
+color.RGBA.
+
+The old image/ycbcr package has been folded, with some
+renamings, into the
+image
+and
+image/color
+packages.
+
+The old image.ColorImage type is still in the image
+package but has been renamed
+image.Uniform,
+while image.Tiled
+has been renamed
+image.Repeated.
+
+This table lists the renamings. +
+ +| Old | +New | +
|---|---|
| image.Color | color.Color |
| image.ColorModel | color.Model |
| image.ColorModelFunc | color.ModelFunc |
| image.PalettedColorModel | color.Palette |
| image.RGBAColor | color.RGBA |
| image.RGBA64Color | color.RGBA64 |
| image.NRGBAColor | color.NRGBA |
| image.NRGBA64Color | color.NRGBA64 |
| image.AlphaColor | color.Alpha |
| image.Alpha16Color | color.Alpha16 |
| image.GrayColor | color.Gray |
| image.Gray16Color | color.Gray16 |
| image.RGBAColorModel | color.RGBAModel |
| image.RGBA64ColorModel | color.RGBA64Model |
| image.NRGBAColorModel | color.NRGBAModel |
| image.NRGBA64ColorModel | color.NRGBA64Model |
| image.AlphaColorModel | color.AlphaModel |
| image.Alpha16ColorModel | color.Alpha16Model |
| image.GrayColorModel | color.GrayModel |
| image.Gray16ColorModel | color.Gray16Model |
| ycbcr.RGBToYCbCr | color.RGBToYCbCr |
| ycbcr.YCbCrToRGB | color.YCbCrToRGB |
| ycbcr.YCbCrColorModel | color.YCbCrModel |
| ycbcr.YCbCrColor | color.YCbCr |
| ycbcr.YCbCr | image.YCbCr |
| ycbcr.SubsampleRatio444 | image.YCbCrSubsampleRatio444 |
| ycbcr.SubsampleRatio422 | image.YCbCrSubsampleRatio422 |
| ycbcr.SubsampleRatio420 | image.YCbCrSubsampleRatio420 |
| image.ColorImage | image.Uniform |
| image.Tiled | image.Repeated |
+The image package's New functions
+(NewRGBA,
+NewRGBA64, etc.)
+take an image.Rectangle as an argument
+instead of four integers.
+
+Finally, there are new predefined color.Color variables
+color.Black,
+color.White,
+color.Opaque
+and
+color.Transparent.
+
+Updating: +Gofix will update almost all code affected by the change. +
+In Go 1, the various SetTimeout,
@@ -1224,7 +1342,7 @@ logging and failure reporting.
Updating:
Existing code is unaffected, although benchmarks that use println
-or panic should be updated to the new interface.
+or panic should be updated to use the new methods.
RawURL, which must be fixed by hand.
+
+The image package has had a number of
+minor changes, rearrangements and renamings.
+
+Most of the color handling code has been moved into its own package,
+image/color.
+For the elements that moved, a symmetry arises; for instance,
+each pixel of an
+image.RGBA
+is a
+color.RGBA.
+
+The old image/ycbcr package has been folded, with some
+renamings, into the
+image
+and
+image/color
+packages.
+
+The old image.ColorImage type is still in the image
+package but has been renamed
+image.Uniform,
+while image.Tiled
+has been renamed
+image.Repeated.
+
+This table lists the renamings. +
+ +| Old | +New | +
|---|---|
| image.Color | color.Color |
| image.ColorModel | color.Model |
| image.ColorModelFunc | color.ModelFunc |
| image.PalettedColorModel | color.Palette |
| image.RGBAColor | color.RGBA |
| image.RGBA64Color | color.RGBA64 |
| image.NRGBAColor | color.NRGBA |
| image.NRGBA64Color | color.NRGBA64 |
| image.AlphaColor | color.Alpha |
| image.Alpha16Color | color.Alpha16 |
| image.GrayColor | color.Gray |
| image.Gray16Color | color.Gray16 |
| image.RGBAColorModel | color.RGBAModel |
| image.RGBA64ColorModel | color.RGBA64Model |
| image.NRGBAColorModel | color.NRGBAModel |
| image.NRGBA64ColorModel | color.NRGBA64Model |
| image.AlphaColorModel | color.AlphaModel |
| image.Alpha16ColorModel | color.Alpha16Model |
| image.GrayColorModel | color.GrayModel |
| image.Gray16ColorModel | color.Gray16Model |
| ycbcr.RGBToYCbCr | color.RGBToYCbCr |
| ycbcr.YCbCrToRGB | color.YCbCrToRGB |
| ycbcr.YCbCrColorModel | color.YCbCrModel |
| ycbcr.YCbCrColor | color.YCbCr |
| ycbcr.YCbCr | image.YCbCr |
| ycbcr.SubsampleRatio444 | image.YCbCrSubsampleRatio444 |
| ycbcr.SubsampleRatio422 | image.YCbCrSubsampleRatio422 |
| ycbcr.SubsampleRatio420 | image.YCbCrSubsampleRatio420 |
| image.ColorImage | image.Uniform |
| image.Tiled | image.Repeated |
+The image package's New functions
+(NewRGBA,
+NewRGBA64, etc.)
+take an image.Rectangle as an argument
+instead of four integers.
+
+Finally, there are new predefined color.Color variables
+color.Black,
+color.White,
+color.Opaque
+and
+color.Transparent.
+
+Updating: +Gofix will update almost all code affected by the change. +
+In Go 1, the various SetTimeout,
@@ -1114,7 +1232,7 @@ logging and failure reporting.
Updating:
Existing code is unaffected, although benchmarks that use println
-or panic should be updated to the new interface.
+or panic should be updated to use the new methods.