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

Unified Diff: tools/skimage_main.cpp

Issue 666073006: Add flag to skimage for decoding into unpremul. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/skimage_main.cpp
diff --git a/tools/skimage_main.cpp b/tools/skimage_main.cpp
index a2d353c25de695fa5d63f96c657688227f836f44..7a1954a07237b61afdb5eceb3bee88276e865ef5 100644
--- a/tools/skimage_main.cpp
+++ b/tools/skimage_main.cpp
@@ -34,6 +34,7 @@ DEFINE_bool(testSubsetDecoding, true, "Test decoding subsets of images.");
DEFINE_bool(writeChecksumBasedFilenames, false, "When writing out actual images, use checksum-"
"based filenames, as rebaseline.py will use when downloading them from Google Storage");
DEFINE_string2(writePath, w, "", "Write rendered images into this directory.");
+DEFINE_bool(unpremul, false, "Require unpremultiplied colors.");
struct Format {
SkImageEncoder::Type fType;
@@ -499,6 +500,7 @@ static void decodeFileAndWrite(const char srcPath[], const SkString* writePath)
codec->setSkipWritingZeroes(FLAGS_skip);
codec->setSampleSize(FLAGS_sampleSize);
+ codec->setRequireUnpremultipliedColors(FLAGS_unpremul);
stream.rewind();
// Create a string representing just the filename itself, for use in json expectations.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698