diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-10-08 19:40:18 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-10-08 19:40:18 +0000 |
commit | dac4a1d518a4788c3e2475d68cbe8683b4a448ff (patch) | |
tree | 9e805fec8e6d96b40327c3e7914e978f96f7762d /tools | |
parent | c0de5d6b5fe312ec39a544fcefdb7673082a07b8 (diff) |
Allow sampling GIF images during decode.
SkScaledBitmapSampler:
Add a mode for sampling rows out of order, used by GIF decoder for
interlaced images.
Add a getter for the X sampling rate.
SkImageDecoder_libgif:
Respect the sampleSize set on SkImageDecoder.
skimage_main:
Provide an option to set a sample size.
BUG=https://b.corp.google.com/issue?id=8999690
R=reed@google.com, djsollen@google.com, halcanary@google.com
Author: scroggo@google.com
Review URL: https://codereview.chromium.org/25354004
git-svn-id: http://skia.googlecode.com/svn/trunk@11659 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tools')
-rw-r--r-- | tools/skimage_main.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/skimage_main.cpp b/tools/skimage_main.cpp index 11aeb766fb..6ff5978f12 100644 --- a/tools/skimage_main.cpp +++ b/tools/skimage_main.cpp @@ -28,9 +28,10 @@ DEFINE_string(mismatchPath, "", "Folder to write mismatched images to."); DEFINE_string2(readPath, r, "", "Folder(s) and files to decode images. Required."); DEFINE_string(readExpectationsPath, "", "Path to read JSON expectations from."); DEFINE_bool(reencode, true, "Reencode the images to test encoding."); +DEFINE_int32(sampleSize, 1, "Set the sampleSize for decoding."); +DEFINE_bool(skip, false, "Skip writing zeroes."); DEFINE_bool(testSubsetDecoding, true, "Test decoding subsets of images."); DEFINE_string2(writePath, w, "", "Write rendered images into this directory."); -DEFINE_bool(skip, false, "Skip writing zeroes."); struct Format { SkImageEncoder::Type fType; @@ -400,6 +401,7 @@ static void decodeFileAndWrite(const char srcPath[], const SkString* writePath) SkAutoTDelete<SkImageDecoder> ad(codec); codec->setSkipWritingZeroes(FLAGS_skip); + codec->setSampleSize(FLAGS_sampleSize); stream.rewind(); // Create a string representing just the filename itself, for use in json expectations. |