Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(50)

Issue 1903049: code review 1903049: image: introduce Grayscale and Grayscale16 types. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 9 months ago by nigeltao
Modified:
14 years, 9 months ago
Reviewers:
CC:
rsc, golang-dev, mpl, r
Visibility:
Public.

Description

image: introduce Gray and Gray16 types, and remove the named colors except for Black and White.

Patch Set 1 #

Patch Set 2 : code review 1903049: image: introduce Grayscale and Grayscale16 types. #

Patch Set 3 : code review 1903049: image: introduce Grayscale and Grayscale16 types. #

Patch Set 4 : code review 1903049: image: introduce Gray and Gray16 types, and remove the ... #

Patch Set 5 : code review 1903049: image: introduce Gray and Gray16 types, and remove the ... #

Unified diffs Side-by-side diffs Delta from patch set Stats (+121 lines, -22 lines) Patch
M src/pkg/image/color.go View 1 2 3 3 chunks +45 lines, -0 lines 0 comments Download
M src/pkg/image/image.go View 1 2 3 1 chunk +72 lines, -0 lines 0 comments Download
M src/pkg/image/names.go View 1 chunk +4 lines, -22 lines 0 comments Download

Messages

Total messages: 17
nigeltao
Hello rsc (cc: golang-dev@googlegroups.com, mpl, r), I'd like you to review this change.
14 years, 9 months ago (2010-08-01 17:53:00 UTC) #1
rsc1
Looks good but I would consider renaming the color, which I think is far less ...
14 years, 9 months ago (2010-08-01 18:08:32 UTC) #2
nigeltao_gnome
On 2 August 2010 04:08, <rsc@google.com> wrote: > Looks good but I would consider renaming ...
14 years, 9 months ago (2010-08-01 18:18:51 UTC) #3
rsc
On Sun, Aug 1, 2010 at 11:18, Nigel Tao <nigel.tao.gnome@gmail.com> wrote: > On 2 August ...
14 years, 9 months ago (2010-08-01 21:25:38 UTC) #4
nigeltao_gnome
On 02/08/2010, Rob 'Commander' Pike <r@golang.org> wrote: > i agree the names are long, and ...
14 years, 9 months ago (2010-08-01 23:28:48 UTC) #5
nigeltao_gnome
On 2 August 2010 09:28, Nigel Tao <nigel.tao.gnome@gmail.com> wrote: > I think that, given image.Red ...
14 years, 9 months ago (2010-08-02 01:13:56 UTC) #6
rsc
On Sun, Aug 1, 2010 at 18:13, Nigel Tao <nigel.tao.gnome@gmail.com> wrote: > On 2 August ...
14 years, 9 months ago (2010-08-02 22:46:52 UTC) #7
nigeltao_gnome
On 3 August 2010 08:46, Russ Cox <rsc@golang.org> wrote: > color.White is a nice name. ...
14 years, 9 months ago (2010-08-02 23:33:08 UTC) #8
rsc
> Even if we spin up a separate color package, though, we still have a ...
14 years, 9 months ago (2010-08-02 23:37:28 UTC) #9
rsc
> How about I s/Grayscale/Gray/ as well as drop the non-important colors > in this ...
14 years, 9 months ago (2010-08-02 23:37:45 UTC) #10
nigeltao_gnome
On 3 August 2010 09:37, Russ Cox <rsc@golang.org> wrote: > No, you can't do that ...
14 years, 9 months ago (2010-08-02 23:43:53 UTC) #11
rsc
> image.Color --> color.Color > image.ColorModel --> color.Model > image.Image --> image.Image > image.White --> ...
14 years, 9 months ago (2010-08-02 23:56:33 UTC) #12
nigeltao_gnome
PTAL.
14 years, 9 months ago (2010-08-02 23:56:56 UTC) #13
nigeltao_gnome
On 3 August 2010 09:56, Russ Cox <rsc@golang.org> wrote: > On the other hand, if ...
14 years, 9 months ago (2010-08-03 00:05:06 UTC) #14
rsc
> OK, I'll leave image.RGBAColor as image.RGBAColor. > > But if the color package would ...
14 years, 9 months ago (2010-08-03 00:10:41 UTC) #15
nigeltao
*** Submitted as http://code.google.com/p/go/source/detail?r=98a867302cb4 *** image: introduce Gray and Gray16 types, and remove the named ...
14 years, 9 months ago (2010-08-03 00:58:19 UTC) #16
rog
14 years, 9 months ago (2010-08-03 10:02:14 UTC) #17
On 3 August 2010 01:05, Nigel Tao <nigel.tao.gnome@gmail.com> wrote:
> On 3 August 2010 09:56, Russ Cox <rsc@golang.org> wrote:
>> On the other hand, if we moved just the
>> named colors out, then most clients (all?)
>> wouldn't change.
>
> OK, I'll leave image.RGBAColor as image.RGBAColor.
>
> But if the color package would only hold a handful of variables
> (Black, White, Opaque, Transparent) and no functions or types, it
> hardly seems worth it to me. I think I'd rather just leave it as
> image.Black, etc.

the color package could also implement support
for conversion of colour names (as strings) to colour
values. it could also implement conversions from other
colour spaces, such as HSV and CMYK, to RGB.

this seems enough meat for a package to me.

i'd be sad to lose the colour names.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b