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

Unified Diff: tools/imgconv.cpp

Issue 1760583003: Remove unused tools and unused includes of SkImageDecoder (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 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 | « tools/find_bad_images_in_skps.py ('k') | tools/json/SkJSONCanvas.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/imgconv.cpp
diff --git a/tools/imgconv.cpp b/tools/imgconv.cpp
deleted file mode 100644
index 4c9fb600bb8eccaa1b2628faca2166e25713a6e0..0000000000000000000000000000000000000000
--- a/tools/imgconv.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright 2014 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include "SkBitmap.h"
-#include "SkGraphics.h"
-#include "SkImageDecoder.h"
-#include "SkImageEncoder.h"
-#include "SkString.h"
-
-int tool_main(int argc, char** argv);
-int tool_main(int argc, char** argv) {
- SkAutoGraphics ag;
-
- for (int i = 1; i < argc; ++i) {
- SkString src(argv[i]);
- if (src.endsWith(".png")) {
- SkString dst(src.c_str(), src.size() - 4);
- dst.append(".jpg");
-
- SkBitmap bm;
- if (SkImageDecoder::DecodeFile(src.c_str(), &bm)) {
- if (SkImageEncoder::EncodeFile(dst.c_str(), bm, SkImageEncoder::kJPEG_Type, 100)) {
- SkDebugf("converted %s to %s\n", src.c_str(), dst.c_str());
- } else {
- SkDebugf("failed to encode %s\n", src.c_str());
- }
- } else {
- SkDebugf("failed to decode %s\n", src.c_str());
- }
- }
- }
- return 0;
-}
-
-#if !defined SK_BUILD_FOR_IOS
-int main(int argc, char * const argv[]) {
- return tool_main(argc, (char**) argv);
-}
-#endif
« no previous file with comments | « tools/find_bad_images_in_skps.py ('k') | tools/json/SkJSONCanvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698