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

Side by Side Diff: tools/test_image_decoder.cpp

Issue 24449003: Make Jpeg decoding more fault resistant. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: final rebase Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/find_bad_images_in_skps.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2013 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #include "SkBitmap.h"
9 #include "SkForceLinking.h"
10 #include "SkGraphics.h"
11 #include "SkImageDecoder.h"
12
13 __SK_FORCE_IMAGE_DECODER_LINKING;
14
15 /**
16 Simple program to test Skia's ability to decode images without
17 errors or debug messages. */
18 int main(int argc, char ** argv) {
19 if (argc < 2) {
20 SkDebugf("Usage:\n %s imagefile\n\n", argv[0]);
21 return 3;
22 }
23 SkBitmap bitmap;
24 if (!(SkImageDecoder::DecodeFile(argv[1], &bitmap))) {
25 return 2;
26 }
27 if (bitmap.empty()) {
28 return 1;
29 }
30 return 0;
31 }
32
OLDNEW
« no previous file with comments | « tools/find_bad_images_in_skps.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698