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

Issue 13243047: code review 13243047: go.image/tiff: encoder support Gray/Gray16 format (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 8 months ago by chai2010
Modified:
10 years, 3 months ago
Reviewers:
nigeltao, bsiegert
CC:
nigeltao, bsiegert, golang-dev
Visibility:
Public.

Description

go.image/tiff: encoder support Gray/Gray16/Paletted format Use these commands to generate testdata: # TIFF Tools tiff2bw video-001.tiff video-001-gray.tiff tiffmedian video-001.tiff video-001-paletted.tiff # ImageMagick convert -depth 16 video-001.tiff video-001-16bit.tiff convert -depth 16 video-001-gray.tiff video-001-gray-16bit.tiff

Patch Set 1 #

Patch Set 2 : diff -r cd62a2ebd552 https://code.google.com/p/go.image #

Patch Set 3 : diff -r cd62a2ebd552 https://code.google.com/p/go.image #

Patch Set 4 : diff -r cd62a2ebd552 https://code.google.com/p/go.image #

Patch Set 5 : diff -r cd62a2ebd552 https://code.google.com/p/go.image #

Total comments: 6

Patch Set 6 : diff -r cd62a2ebd552 https://code.google.com/p/go.image #

Total comments: 5

Patch Set 7 : diff -r cd62a2ebd552 https://code.google.com/p/go.image #

Total comments: 2

Patch Set 8 : diff -r cd62a2ebd552 https://code.google.com/p/go.image #

Patch Set 9 : diff -r cd62a2ebd552 https://code.google.com/p/go.image #

Patch Set 10 : diff -r cd62a2ebd552 https://code.google.com/p/go.image #

Patch Set 11 : diff -r cd62a2ebd552 https://code.google.com/p/go.image #

Total comments: 4

Patch Set 12 : diff -r cd62a2ebd552 https://code.google.com/p/go.image #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+171 lines, -42 lines) Patch
A testdata/video-001-16bit.tiff View 1 2 3 4 5 6 7 Binary file 0 comments Download
A testdata/video-001-gray.tiff View 1 2 3 4 5 6 7 Binary file 0 comments Download
A testdata/video-001-gray-16bit.tiff View 1 2 3 4 5 6 7 Binary file 0 comments Download
A testdata/video-001-paletted.tiff View 1 2 3 4 5 6 7 Binary file 0 comments Download
M tiff/writer.go View 1 2 3 4 5 6 7 8 chunks +150 lines, -40 lines 2 comments Download
M tiff/writer_test.go View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +21 lines, -2 lines 1 comment Download

Messages

Total messages: 13
chai2010
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go.image
10 years, 8 months ago (2013-09-12 07:08:43 UTC) #1
nigeltao
bsiegert should also look at this. https://codereview.appspot.com/13243047/diff/11001/tiff/writer.go File tiff/writer.go (right): https://codereview.appspot.com/13243047/diff/11001/tiff/writer.go#newcode83 tiff/writer.go:83: return writePix(w, pix, ...
10 years, 8 months ago (2013-09-13 01:37:59 UTC) #2
chai2010
PTAL https://codereview.appspot.com/13243047/diff/11001/tiff/writer.go File tiff/writer.go (right): https://codereview.appspot.com/13243047/diff/11001/tiff/writer.go#newcode83 tiff/writer.go:83: return writePix(w, pix, dy, dx*2, stride) On 2013/09/13 ...
10 years, 8 months ago (2013-09-13 02:55:36 UTC) #3
nigeltao
https://codereview.appspot.com/13243047/diff/16001/tiff/writer.go File tiff/writer.go (right): https://codereview.appspot.com/13243047/diff/16001/tiff/writer.go#newcode85 tiff/writer.go:85: max := y*stride + dx dx*2. Tests for this ...
10 years, 8 months ago (2013-09-13 03:10:41 UTC) #4
chai2010
https://codereview.appspot.com/13243047/diff/16001/tiff/writer.go File tiff/writer.go (right): https://codereview.appspot.com/13243047/diff/16001/tiff/writer.go#newcode85 tiff/writer.go:85: max := y*stride + dx On 2013/09/13 03:10:42, nigeltao ...
10 years, 8 months ago (2013-09-13 03:27:37 UTC) #5
nigeltao
https://codereview.appspot.com/13243047/diff/16001/tiff/writer.go File tiff/writer.go (right): https://codereview.appspot.com/13243047/diff/16001/tiff/writer.go#newcode85 tiff/writer.go:85: max := y*stride + dx On 2013/09/13 03:27:37, chai2010 ...
10 years, 8 months ago (2013-09-13 03:38:57 UTC) #6
chai2010
I have made a Gray/Gray16/Paletted format test. Please take another look. https://codereview.appspot.com/13243047/diff/17002/tiff/writer.go File tiff/writer.go (right): ...
10 years, 8 months ago (2013-09-13 06:05:27 UTC) #7
chai2010
go test -test.bench=. before: BenchmarkEncode 500000 6058 ns/op 10200.80 MB/s BenchmarkEncodePaletted 5000 689439 ns/op 22.41 ...
10 years, 8 months ago (2013-09-13 06:40:28 UTC) #8
bsiegert
This look great, thanks. https://codereview.appspot.com/13243047/diff/46001/tiff/writer_test.go File tiff/writer_test.go (right): https://codereview.appspot.com/13243047/diff/46001/tiff/writer_test.go#newcode20 tiff/writer_test.go:20: //{"video-001-16bit.tiff", nil}, remove https://codereview.appspot.com/13243047/diff/46001/tiff/writer_test.go#newcode92 tiff/writer_test.go:92: ...
10 years, 8 months ago (2013-09-13 06:50:19 UTC) #9
bsiegert
LGTM
10 years, 8 months ago (2013-09-13 06:50:37 UTC) #10
chai2010
PTAL https://codereview.appspot.com/13243047/diff/46001/tiff/writer_test.go File tiff/writer_test.go (right): https://codereview.appspot.com/13243047/diff/46001/tiff/writer_test.go#newcode20 tiff/writer_test.go:20: //{"video-001-16bit.tiff", nil}, On 2013/09/13 06:50:19, bsiegert wrote: > ...
10 years, 8 months ago (2013-09-13 06:56:54 UTC) #11
nigeltao
LGTM. I'll make the trivial changes and submit. https://codereview.appspot.com/13243047/diff/52001/tiff/writer.go File tiff/writer.go (right): https://codereview.appspot.com/13243047/diff/52001/tiff/writer.go#newcode90 tiff/writer.go:90: // ...
10 years, 8 months ago (2013-09-13 07:36:59 UTC) #12
nigeltao
10 years, 8 months ago (2013-09-13 07:43:07 UTC) #13
*** Submitted as
https://code.google.com/p/go/source/detail?r=05ecbc2aa386&repo=image ***

go.image/tiff: encoder support Gray/Gray16/Paletted format

Use these commands to generate testdata:

# TIFF Tools
tiff2bw    video-001.tiff video-001-gray.tiff
tiffmedian video-001.tiff video-001-paletted.tiff

# ImageMagick
convert -depth 16 video-001.tiff      video-001-16bit.tiff
convert -depth 16 video-001-gray.tiff video-001-gray-16bit.tiff

R=nigeltao, bsiegert
CC=golang-dev
https://codereview.appspot.com/13243047

Committer: Nigel Tao <nigeltao@golang.org>
Sign in to reply to this message.

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