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

Issue 10977043: code review 10977043: image/draw: add Quantizer, NaiveQuantizer and FloydStei... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 9 months ago by nigeltao
Modified:
9 years, 7 months ago
Reviewers:
r, srinathh
CC:
r, Andrew Bonventre, andybons, golang-dev
Visibility:
Public.

Description

image/draw: add Drawer, FloydSteinberg and the op.Draw method.

Patch Set 1 #

Patch Set 2 : diff -r 0d2b8690d896 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 0d2b8690d896 https://go.googlecode.com/hg/ #

Total comments: 9

Patch Set 4 : diff -r 06606915c043 https://go.googlecode.com/hg/ #

Patch Set 5 : diff -r 06606915c043 https://go.googlecode.com/hg/ #

Patch Set 6 : diff -r 10c77beaed35 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+268 lines, -35 lines) Patch
M src/pkg/image/color/color.go View 1 2 3 2 chunks +10 lines, -16 lines 0 comments Download
M src/pkg/image/draw/draw.go View 1 2 3 4 8 chunks +183 lines, -19 lines 0 comments Download
M src/pkg/image/draw/draw_test.go View 1 2 3 4 5 2 chunks +75 lines, -0 lines 0 comments Download

Messages

Total messages: 14
nigeltao
Hello r@golang.org (cc: andybons@gmail.com, golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
10 years, 9 months ago (2013-07-07 12:34:22 UTC) #1
nigeltao
With https://codereview.appspot.com/10890045/ and the source image at http://blog.golang.org/go-at-google-io-2011-videos_gopher.jpg the program below produces the attached paletted ...
10 years, 9 months ago (2013-07-07 12:41:14 UTC) #2
Andrew Bonventre
https://codereview.appspot.com/10977043/diff/6001/src/pkg/image/draw/quantize.go File src/pkg/image/draw/quantize.go (right): https://codereview.appspot.com/10977043/diff/6001/src/pkg/image/draw/quantize.go#newcode1 src/pkg/image/draw/quantize.go:1: // Copyright 2013 The Go Authors. All rights reserved. ...
10 years, 9 months ago (2013-07-07 20:15:26 UTC) #3
r
https://codereview.appspot.com/10977043/diff/6001/src/pkg/image/draw/quantize.go File src/pkg/image/draw/quantize.go (right): https://codereview.appspot.com/10977043/diff/6001/src/pkg/image/draw/quantize.go#newcode78 src/pkg/image/draw/quantize.go:78: bestIndex, bestSSD := 0, uint32(1<<32-1) this is fine but ...
10 years, 9 months ago (2013-07-08 01:51:25 UTC) #4
r
https://codereview.appspot.com/10977043/diff/6001/src/pkg/image/draw/quantize.go File src/pkg/image/draw/quantize.go (right): https://codereview.appspot.com/10977043/diff/6001/src/pkg/image/draw/quantize.go#newcode16 src/pkg/image/draw/quantize.go:16: Quantize(dst *image.Paletted, r image.Rectangle, src image.Image, sp image.Point) if ...
10 years, 9 months ago (2013-07-08 01:52:23 UTC) #5
nigeltao
https://codereview.appspot.com/10977043/diff/6001/src/pkg/image/draw/quantize.go File src/pkg/image/draw/quantize.go (right): https://codereview.appspot.com/10977043/diff/6001/src/pkg/image/draw/quantize.go#newcode16 src/pkg/image/draw/quantize.go:16: Quantize(dst *image.Paletted, r image.Rectangle, src image.Image, sp image.Point) On ...
10 years, 9 months ago (2013-07-08 03:06:38 UTC) #6
r
https://codereview.appspot.com/10977043/diff/6001/src/pkg/image/draw/quantize.go File src/pkg/image/draw/quantize.go (right): https://codereview.appspot.com/10977043/diff/6001/src/pkg/image/draw/quantize.go#newcode16 src/pkg/image/draw/quantize.go:16: Quantize(dst *image.Paletted, r image.Rectangle, src image.Image, sp image.Point) floyd-steinberg ...
10 years, 9 months ago (2013-07-08 03:10:22 UTC) #7
nigeltao
PTAL. FloydSteinberg now applies to any draw.Image, not just an *image.Paletted. NaiveQuantizer was removed; use ...
10 years, 9 months ago (2013-07-09 23:33:01 UTC) #8
r
LGTM
10 years, 9 months ago (2013-07-10 03:10:43 UTC) #9
nigeltao
*** Submitted as https://code.google.com/p/go/source/detail?r=ddb4f9feee8b *** image/draw: add Drawer, FloydSteinberg and the op.Draw method. R=r, andybons ...
10 years, 9 months ago (2013-07-10 22:47:44 UTC) #10
srinathh_gmail.com
Nigel, Have you released any Quantizer implementation yet that produces an optimized color.Palette for an ...
9 years, 7 months ago (2014-08-29 20:36:43 UTC) #11
nigeltao
On Sat, Aug 30, 2014 at 6:36 AM, <srinathh@gmail.com> wrote: > Have you released any ...
9 years, 7 months ago (2014-09-01 06:37:51 UTC) #12
srinathh_gmail.com
Hi Nigel, Thanks - yes i also realized this yesterday night looking through the sources ...
9 years, 7 months ago (2014-09-01 07:57:41 UTC) #13
nigeltao
9 years, 7 months ago (2014-09-02 00:14:01 UTC) #14
On Mon, Sep 1, 2014 at 5:57 PM, Hariharan Srinath <srinathh@gmail.com> wrote:
> If i understand this thread correctly, FloydSteinberg should now apply in
> all cases & this parameter should be true instead right? Or alternatively in
> case omitting dithering is a feature, I guess the documentation should note
> it?

Floyd-Steinberg should not apply in all cases. Dithering results in
better quality images, but it's slower to compute, and the results
don't compress as well. There are also multiple ways to dither;
Floyd-Steinberg is only one algorithm of many. The default operation
for draw.Draw is not to dither.
Sign in to reply to this message.

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