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

Issue 25726004: Fixes for decoding to A8. (Closed)

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

Description

Fixes for decoding to A8. src/images/SkImageDecoder_libpng.cpp: A8 images are not opaque, so do not set the opaque flag. This fixes a bug where copyTo does not work as expected (when copying an A8 decoded image to ARGB_8888), leading to a bitmap hash that does not represent the image correctly (in skimage). tools/skimage_main.cpp: In write_bitmap, which is creating the image for visual comparison, copy A8 to 8888, since A8 cannot be encoded. In the section that tests reencoding, do not test reencoding A8, which is known to not work. Committed: http://code.google.com/p/skia/source/detail?r=11589

Patch Set 1 #

Patch Set 2 : #

Total comments: 9
Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -2 lines) Patch
M src/images/SkImageDecoder_libpng.cpp View 1 2 chunks +6 lines, -0 lines 5 comments Download
M tools/skimage_main.cpp View 2 chunks +15 lines, -2 lines 4 comments Download

Messages

Total messages: 11 (0 generated)
scroggo
7 years, 2 months ago (2013-10-02 18:47:26 UTC) #1
scroggo
I had assigned to Mike, but he's out of office. Derek, can you take a ...
7 years, 2 months ago (2013-10-03 16:50:38 UTC) #2
djsollen
lgtm https://codereview.chromium.org/25726004/diff/4001/tools/skimage_main.cpp File tools/skimage_main.cpp (right): https://codereview.chromium.org/25726004/diff/4001/tools/skimage_main.cpp#newcode118 tools/skimage_main.cpp:118: // support A8. is that a feature that ...
7 years, 2 months ago (2013-10-03 16:54:28 UTC) #3
scroggo
https://codereview.chromium.org/25726004/diff/4001/tools/skimage_main.cpp File tools/skimage_main.cpp (right): https://codereview.chromium.org/25726004/diff/4001/tools/skimage_main.cpp#newcode118 tools/skimage_main.cpp:118: // support A8. On 2013/10/03 16:54:28, djsollen wrote: > ...
7 years, 2 months ago (2013-10-03 16:58:52 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/scroggo@google.com/25726004/4001
7 years, 2 months ago (2013-10-03 17:04:24 UTC) #5
commit-bot: I haz the power
Change committed as 11589
7 years, 2 months ago (2013-10-03 17:13:44 UTC) #6
reed1
https://codereview.chromium.org/25726004/diff/4001/src/images/SkImageDecoder_libpng.cpp File src/images/SkImageDecoder_libpng.cpp (right): https://codereview.chromium.org/25726004/diff/4001/src/images/SkImageDecoder_libpng.cpp#newcode439 src/images/SkImageDecoder_libpng.cpp:439: reallyHasAlpha = true; I thought this variable was set ...
7 years, 2 months ago (2013-10-04 08:56:27 UTC) #7
scroggo
https://codereview.chromium.org/25726004/diff/4001/src/images/SkImageDecoder_libpng.cpp File src/images/SkImageDecoder_libpng.cpp (right): https://codereview.chromium.org/25726004/diff/4001/src/images/SkImageDecoder_libpng.cpp#newcode439 src/images/SkImageDecoder_libpng.cpp:439: reallyHasAlpha = true; On 2013/10/04 08:56:27, reed1 wrote: > ...
7 years, 2 months ago (2013-10-04 19:45:53 UTC) #8
reed1
https://codereview.chromium.org/25726004/diff/4001/src/images/SkImageDecoder_libpng.cpp File src/images/SkImageDecoder_libpng.cpp (right): https://codereview.chromium.org/25726004/diff/4001/src/images/SkImageDecoder_libpng.cpp#newcode439 src/images/SkImageDecoder_libpng.cpp:439: reallyHasAlpha = true; On 2013/10/04 19:45:53, scroggo wrote: > ...
7 years, 2 months ago (2013-10-07 13:31:39 UTC) #9
scroggo
https://codereview.chromium.org/25726004/diff/4001/src/images/SkImageDecoder_libpng.cpp File src/images/SkImageDecoder_libpng.cpp (right): https://codereview.chromium.org/25726004/diff/4001/src/images/SkImageDecoder_libpng.cpp#newcode439 src/images/SkImageDecoder_libpng.cpp:439: reallyHasAlpha = true; On 2013/10/07 13:31:39, reed1 wrote: > ...
7 years, 2 months ago (2013-10-07 22:10:29 UTC) #10
reed1
7 years, 2 months ago (2013-10-08 16:25:57 UTC) #11
Message was sent while issue was closed.
https://codereview.chromium.org/25726004/diff/4001/src/images/SkImageDecoder_...
File src/images/SkImageDecoder_libpng.cpp (right):

https://codereview.chromium.org/25726004/diff/4001/src/images/SkImageDecoder_...
src/images/SkImageDecoder_libpng.cpp:438: if (SkBitmap::kA8_Config ==
decodedBitmap->config()) {
Shouldn't this block be done before line 431?

Powered by Google App Engine
This is Rietveld 408576698