From e0b94d1cf16c11406554edd035c7e1bef6d2b844 Mon Sep 17 00:00:00 2001 From: Brian Carlstrom Date: Thu, 27 Mar 2014 14:50:06 -0700 Subject: [PATCH] Revert "Remove doSingleCrunch call DO NOT MERGE" This reverts commit 3944abbb506bb94d8e70b8b62f30225777f50648. --- tools/aapt/Command.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tools/aapt/Command.cpp b/tools/aapt/Command.cpp index f7083a9e9e868..c3a093034d7d3 100644 --- a/tools/aapt/Command.cpp +++ b/tools/aapt/Command.cpp @@ -1840,6 +1840,25 @@ int doCrunch(Bundle* bundle) return NO_ERROR; } +/* + * Do PNG Crunching on a single flag + * -i points to a single png file + * -o points to a single png output file + */ +int doSingleCrunch(Bundle* bundle) +{ + fprintf(stdout, "Crunching single PNG file: %s\n", bundle->getSingleCrunchInputFile()); + fprintf(stdout, "\tOutput file: %s\n", bundle->getSingleCrunchOutputFile()); + + String8 input(bundle->getSingleCrunchInputFile()); + String8 output(bundle->getSingleCrunchOutputFile()); + if (preProcessImageToCache(bundle, input, output) != NO_ERROR) { + // we can't return the status_t as it gets truncate to the lower 8 bits. + return 42; + } + return NO_ERROR; +} + char CONSOLE_DATA[2925] = { 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 95, 46, 32, 32, 32, 32, 32, 32, 32, 32, 32,