• Nigel Tao's avatar
    image: spin off a new color package out of the image package. · a2846e65
    Nigel Tao authored
    The spin-off renames some types. The new names are simply better:
    image.Color              -> color.Color
    image.ColorModel         -> color.Model
    image.ColorModelFunc     -> color.ModelFunc
    image.PalettedColorModel -> color.Palette
    image.RGBAColor          -> color.RGBA
    image.RGBAColorModel     -> color.RGBAModel
    image.RGBA64Color        -> color.RGBA64
    image.RGBA64ColorModel   -> color.RGBA64Model
    (similarly for NRGBAColor, GrayColorModel, etc)
    
    The image.ColorImage type stays in the image package, but is renamed:
    image.ColorImage -> image.Uniform
    
    The image.Image implementations (image.RGBA, image.RGBA64, image.NRGBA,
    image.Alpha, etc) do not change their name, and gain a nice symmetry:
    an image.RGBA is an image of color.RGBA, etc.
    
    The image.Black, image.Opaque uniform images remain unchanged (although
    their type is renamed from image.ColorImage to image.Uniform). The
    corresponding color types (color.Black, color.Opaque, etc) are new.
    
    Nothing in the image/ycbcr is renamed yet. The ycbcr.YCbCrColor and
    ycbcr.YCbCrImage types will eventually migrate to color.YCbCr and
    image.YCbCr, but that will be a separate CL.
    
    R=r, bsiegert
    CC=golang-dev
    https://golang.org/cl/5132048
    a2846e65
image_test.go 3.16 KB