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

Issue 14363003: Updates to skimage tool to use it for testing. (Closed)

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

Description

Updates to skimage tool to use it for testing. skimage_main.cpp: More changes in the interest of testing our decoders. force_all_opaque before writing PNG files. Test reencoding the image to its original type (if possible), and then test redecoding it (to make sure the encoding was successful). Add an option to turn off this behavior. Merge decodeFileAndWrite with decodeFile. SkImageDecoder: Add kUnknown_Type to SkImageEncoder::Types. Add a static function to get the Format of an SkStream. In getFormatName(), remove an incorrect assert. When calling the flavor of DecodeStream that returns the Format, check the stream if the decoder returns kUnknown_Format. BUG=https://code.google.com/p/skia/issues/detail?id=1241 Committed: https://code.google.com/p/skia/source/detail?r=8862

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : Fix some asserts; save reencoded data to a file. #

Patch Set 4 : Report success of writing reencoded data. #

Patch Set 5 : Remove fake support for GIF on Windows and remove a printf. #

Total comments: 15

Patch Set 6 : Change getFormatName to use a switch statement. #

Total comments: 2

Patch Set 7 : Remove Unknown from gFormats. Fix forcing all opaque. #

Patch Set 8 : Add SkImageDecoder::getFormat(SkStream*). #

Patch Set 9 : Implement onGetFormat in SkImageDecoder_CG. #

Patch Set 10 : Implement onGetFormat for other decoders. #

Total comments: 13

Patch Set 11 : Address comments. Need to test on other platforms. #

Patch Set 12 : Fix assert #

Patch Set 13 : Fix for windows. #

Patch Set 14 : Small movement of code to where it's referenced. #

Patch Set 15 : Fix a potential crash in SkImageDecoder_CG. #

Total comments: 3

Patch Set 16 : GetFormat -> GetStreamFormat #

Unified diffs Side-by-side diffs Delta from patch set Stats (+479 lines, -99 lines) Patch
M gyp/images.gyp View 1 2 3 4 5 6 7 12 1 chunk +2 lines, -0 lines 0 comments Download
M include/images/SkImageDecoder.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +6 lines, -9 lines 0 comments Download
M include/images/SkImageEncoder.h View 12 1 chunk +1 line, -0 lines 0 comments Download
M src/images/SkImageDecoder.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +26 lines, -13 lines 0 comments Download
M src/images/SkImageDecoder_FactoryRegistrar.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +22 lines, -0 lines 0 comments Download
M src/images/SkImageDecoder_libbmp.cpp View 1 2 3 4 5 6 7 8 9 10 2 chunks +16 lines, -3 lines 0 comments Download
M src/images/SkImageDecoder_libgif.cpp View 1 2 3 4 5 6 7 8 9 10 2 chunks +20 lines, -7 lines 0 comments Download
M src/images/SkImageDecoder_libico.cpp View 1 2 3 4 5 6 7 8 9 10 2 chunks +21 lines, -5 lines 0 comments Download
M src/images/SkImageDecoder_libjpeg.cpp View 1 2 3 4 5 6 7 8 9 10 3 chunks +21 lines, -6 lines 0 comments Download
M src/images/SkImageDecoder_libpng.cpp View 1 2 3 4 5 6 7 8 9 10 2 chunks +17 lines, -1 line 0 comments Download
M src/images/SkImageDecoder_libwebp.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +9 lines, -0 lines 0 comments Download
M src/images/SkImageDecoder_wbmp.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +9 lines, -0 lines 0 comments Download
M src/ports/SkImageDecoder_CG.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +42 lines, -0 lines 0 comments Download
M src/ports/SkImageDecoder_WIC.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 6 chunks +82 lines, -6 lines 0 comments Download
M tools/skimage_main.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +185 lines, -49 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
scroggo
More changes to test image decoding/encoding. Ben, I tried to set up SkImageEncoder_WIC to encode ...
7 years, 8 months ago (2013-04-18 22:02:32 UTC) #1
scroggo
Adding epoger for expertise on comparing image files.
7 years, 8 months ago (2013-04-19 20:19:28 UTC) #2
epoger
A few concerns... and you might want to consider asking bungeman to take a look. ...
7 years, 8 months ago (2013-04-19 21:35:16 UTC) #3
scroggo
I haven't addressed all your concerns, but wanted to address the easy ones. Will handle ...
7 years, 8 months ago (2013-04-19 22:12:01 UTC) #4
epoger
Changes look good so far. Please consider adding unit tests, in addition to the remaining ...
7 years, 8 months ago (2013-04-20 21:10:07 UTC) #5
djsollen
https://codereview.chromium.org/14363003/diff/22001/tools/skimage_main.cpp File tools/skimage_main.cpp (right): https://codereview.chromium.org/14363003/diff/22001/tools/skimage_main.cpp#newcode62 tools/skimage_main.cpp:62: continue; why do you need the unknown type in ...
7 years, 8 months ago (2013-04-22 12:57:41 UTC) #6
scroggo
epoger@ said > Please consider adding unit tests, It is actually my intention that skimage ...
7 years, 8 months ago (2013-04-22 22:10:15 UTC) #7
epoger
https://codereview.chromium.org/14363003/diff/15001/src/images/SkImageDecoder.cpp File src/images/SkImageDecoder.cpp (right): https://codereview.chromium.org/14363003/diff/15001/src/images/SkImageDecoder.cpp#newcode63 src/images/SkImageDecoder.cpp:63: SkASSERT(SK_ARRAY_COUNT(sFormatName) == kLastKnownFormat + 1); On 2013/04/19 22:12:01, scroggo ...
7 years, 8 months ago (2013-04-23 16:03:40 UTC) #8
djsollen
https://codereview.chromium.org/14363003/diff/59001/include/images/SkImageDecoder.h File include/images/SkImageDecoder.h (right): https://codereview.chromium.org/14363003/diff/59001/include/images/SkImageDecoder.h#newcode55 include/images/SkImageDecoder.h:55: const char* getFormatName() const; On 2013/04/22 22:10:16, scroggo wrote: ...
7 years, 8 months ago (2013-04-23 16:40:45 UTC) #9
scroggo
https://codereview.chromium.org/14363003/diff/59001/src/ports/SkImageDecoder_CG.cpp File src/ports/SkImageDecoder_CG.cpp (right): https://codereview.chromium.org/14363003/diff/59001/src/ports/SkImageDecoder_CG.cpp#newcode91 src/ports/SkImageDecoder_CG.cpp:91: return UTType_to_Format(name); On 2013/04/23 16:03:41, epoger wrote: > Oh. ...
7 years, 8 months ago (2013-04-23 20:55:18 UTC) #10
scroggo
https://codereview.chromium.org/14363003/diff/59001/include/images/SkImageDecoder.h File include/images/SkImageDecoder.h (right): https://codereview.chromium.org/14363003/diff/59001/include/images/SkImageDecoder.h#newcode40 include/images/SkImageDecoder.h:40: kMultiple_Formats, On 2013/04/23 16:03:41, epoger wrote: > On 2013/04/22 ...
7 years, 8 months ago (2013-04-24 18:00:04 UTC) #11
djsollen
as long as elliot feels his comments are addressed this looks ok to me.
7 years, 8 months ago (2013-04-24 18:26:51 UTC) #12
epoger
LGTM! Two optional suggestions, fine with me to commit with or without. https://codereview.chromium.org/14363003/diff/79001/include/images/SkImageDecoder.h File include/images/SkImageDecoder.h ...
7 years, 8 months ago (2013-04-25 14:38:43 UTC) #13
scroggo
https://codereview.chromium.org/14363003/diff/79001/include/images/SkImageDecoder.h File include/images/SkImageDecoder.h (right): https://codereview.chromium.org/14363003/diff/79001/include/images/SkImageDecoder.h#newcode50 include/images/SkImageDecoder.h:50: static Format GetFormat(SkStream*); On 2013/04/25 14:38:43, epoger wrote: > ...
7 years, 8 months ago (2013-04-25 17:31:05 UTC) #14
scroggo
7 years, 8 months ago (2013-04-25 17:34:01 UTC) #15
Message was sent while issue was closed.
Committed patchset #16 manually as r8862 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698