Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Issue 14567011: Test region decoding in skimage, plus fixes. (Closed)

Created:
7 years, 7 months ago by scroggo
Modified:
7 years, 7 months ago
Reviewers:
djsollen, fmalita_google_do_not_use, josephwen
CC:
skia-review_googlegroups.com
Visibility:
Public.

Description

Test region decoding in skimage, plus fixes. Add tests in skimage to perform region decoding. Write out a PNG of the region as well as a bitmap obtained with extractSubset for comparison. Rename decodeRegion to decodeSubset, so it will not be confused with SkRegion. (Leave a function called decodeRegion which calls decodeSubset.) Clean up some comments. Use png_set_interlaced_pass instead of modifying pass directly. Make some changes to region decoding to fix problems I discovered during testing: Only call getAddr within a valid range. Check for a NULL fInputStream. Return a boolean for whether cropBitmap succeeded. In cropBitmap, do not attempt to draw to a bitmap to an Index8 bitmap, which crashes. Use extractSubset instead. Remove an assert. R=djsollen@google.com Committed: https://code.google.com/p/skia/source/detail?r=8996

Patch Set 1 #

Total comments: 8

Patch Set 2 : Respond to comments #

Total comments: 2

Patch Set 3 : Small comment fix. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+158 lines, -31 lines) Patch
M include/images/SkImageDecoder.h View 3 chunks +14 lines, -5 lines 0 comments Download
M src/images/SkImageDecoder.cpp View 1 5 chunks +33 lines, -11 lines 0 comments Download
M src/images/SkImageDecoder_libjpeg.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M src/images/SkImageDecoder_libpng.cpp View 6 chunks +14 lines, -11 lines 0 comments Download
M src/images/SkImageDecoder_libwebp.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M tools/skimage_main.cpp View 1 2 6 chunks +93 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
scroggo
Joseph, it looks like you wrote some of the decodeRegion code, so I wanted to ...
7 years, 7 months ago (2013-05-02 22:08:43 UTC) #1
djsollen
https://codereview.chromium.org/14567011/diff/1/src/images/SkImageDecoder.cpp File src/images/SkImageDecoder.cpp (right): https://codereview.chromium.org/14567011/diff/1/src/images/SkImageDecoder.cpp#newcode227 src/images/SkImageDecoder.cpp:227: //SkASSERT(dst->width() >= w && dst->height() >= h); seems like ...
7 years, 7 months ago (2013-05-03 13:50:29 UTC) #2
scroggo
https://codereview.chromium.org/14567011/diff/1/src/images/SkImageDecoder.cpp File src/images/SkImageDecoder.cpp (right): https://codereview.chromium.org/14567011/diff/1/src/images/SkImageDecoder.cpp#newcode227 src/images/SkImageDecoder.cpp:227: //SkASSERT(dst->width() >= w && dst->height() >= h); On 2013/05/03 ...
7 years, 7 months ago (2013-05-03 17:09:24 UTC) #3
djsollen
lgtm https://codereview.chromium.org/14567011/diff/6001/tools/skimage_main.cpp File tools/skimage_main.cpp (right): https://codereview.chromium.org/14567011/diff/6001/tools/skimage_main.cpp#newcode198 tools/skimage_main.cpp:198: // compared against earlier results. not sure this ...
7 years, 7 months ago (2013-05-03 19:58:12 UTC) #4
scroggo
https://codereview.chromium.org/14567011/diff/6001/tools/skimage_main.cpp File tools/skimage_main.cpp (right): https://codereview.chromium.org/14567011/diff/6001/tools/skimage_main.cpp#newcode198 tools/skimage_main.cpp:198: // compared against earlier results. On 2013/05/03 19:58:12, djsollen ...
7 years, 7 months ago (2013-05-03 20:10:24 UTC) #5
scroggo
7 years, 7 months ago (2013-05-03 20:14:33 UTC) #6
Message was sent while issue was closed.
Committed patchset #3 manually as r8996 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698