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

Issue 26210007: Image decoder fixes (mostly) around A8. (Closed)

Created:
7 years, 2 months ago by scroggo
Modified:
7 years, 2 months ago
Reviewers:
reed1
CC:
skia-review_googlegroups.com
Visibility:
Public.

Description

Image decoder fixes (mostly) around A8. Opaquness: When decoding Gray to A8 in libpng, set reallyHasAlpha to true and add a comment why we do not check for the real answer. Add comments in jpeg decoder explaining why A8 is not opaque. Fix a bug where an A8 subset is considered to be opaque. Other fixes: In SkJPEGImageDecoder, only allocate as much memory as needed for each source row, based on the input config. Also pull out common code into a static function. When performing the check for requiring unpremultiplied colors, allow A8 to succeed, since that setting should have no effect on A8. Add the check for requiring unpremultiplied colors to subset decoding. Fix a bug where attempting to sample gray to A8 does not sample. R=reed@google.com Committed: https://code.google.com/p/skia/source/detail?r=11897

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Total comments: 6

Patch Set 6 : Fix a typo. #

Patch Set 7 : Respond to comments. #

Patch Set 8 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+109 lines, -53 lines) Patch
M src/images/SkImageDecoder_libjpeg.cpp View 1 2 3 4 5 6 7 9 chunks +59 lines, -34 lines 0 comments Download
M src/images/SkImageDecoder_libpng.cpp View 1 2 3 4 5 6 7 4 chunks +45 lines, -18 lines 0 comments Download
M src/images/SkScaledBitmapSampler.cpp View 1 2 3 4 5 1 chunk +5 lines, -1 line 0 comments Download

Messages

Total messages: 7 (0 generated)
scroggo
7 years, 2 months ago (2013-10-07 22:09:35 UTC) #1
reed1
https://codereview.chromium.org/26210007/diff/17001/src/images/SkImageDecoder_libjpeg.cpp File src/images/SkImageDecoder_libjpeg.cpp (right): https://codereview.chromium.org/26210007/diff/17001/src/images/SkImageDecoder_libjpeg.cpp#newcode565 src/images/SkImageDecoder_libjpeg.cpp:565: // Assume an A8 bitmap is opaque to avoid ...
7 years, 2 months ago (2013-10-08 16:24:17 UTC) #2
scroggo
https://codereview.chromium.org/26210007/diff/17001/src/images/SkImageDecoder_libjpeg.cpp File src/images/SkImageDecoder_libjpeg.cpp (right): https://codereview.chromium.org/26210007/diff/17001/src/images/SkImageDecoder_libjpeg.cpp#newcode565 src/images/SkImageDecoder_libjpeg.cpp:565: // Assume an A8 bitmap is opaque to avoid ...
7 years, 2 months ago (2013-10-10 21:46:59 UTC) #3
reed1
requesting some reorg to make the fact that this block of checks involves both capabilities ...
7 years, 2 months ago (2013-10-14 13:26:05 UTC) #4
scroggo
New patch. https://codereview.chromium.org/26210007/diff/17001/src/images/SkImageDecoder_libpng.cpp File src/images/SkImageDecoder_libpng.cpp (right): https://codereview.chromium.org/26210007/diff/17001/src/images/SkImageDecoder_libpng.cpp#newcode949 src/images/SkImageDecoder_libpng.cpp:949: // The exception is A8, where there ...
7 years, 2 months ago (2013-10-14 17:15:19 UTC) #5
reed1
THANK YOU -- very clear to my old eyes lgtm
7 years, 2 months ago (2013-10-14 17:37:12 UTC) #6
scroggo
7 years, 2 months ago (2013-10-21 20:47:39 UTC) #7
Message was sent while issue was closed.
Committed patchset #8 manually as r11897 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698