aboutsummaryrefslogtreecommitdiffhomepage
path: root/dm/DMJsonWriter.cpp
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2016-03-01 10:31:42 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-01 10:31:42 -0800
commitb3f3148ac4a3da7fe5aa1428da1f6a17c37e8f4b (patch)
tree8ac2f154002f7b88c3836e240c646f183258f58b /dm/DMJsonWriter.cpp
parente3e8c727413f9473e139b69d43f89b8884e732d7 (diff)
dm: gamma_correct: true/false -> "yes"/"no"
Diffstat (limited to 'dm/DMJsonWriter.cpp')
-rw-r--r--dm/DMJsonWriter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/dm/DMJsonWriter.cpp b/dm/DMJsonWriter.cpp
index 24b8a58724..7bd8acd6d2 100644
--- a/dm/DMJsonWriter.cpp
+++ b/dm/DMJsonWriter.cpp
@@ -56,7 +56,7 @@ void JsonWriter::DumpJson() {
result["key"]["config"] = gBitmapResults[i].config.c_str();
result["key"]["source_type"] = gBitmapResults[i].sourceType.c_str();
result["options"]["ext"] = gBitmapResults[i].ext.c_str();
- result["options"]["gamma_correct"] = gBitmapResults[i].gammaCorrect;
+ result["options"]["gamma_correct"] = gBitmapResults[i].gammaCorrect ? "yes" : "no";
result["md5"] = gBitmapResults[i].md5.c_str();
// Source options only need to be part of the key if they exist.
@@ -115,7 +115,7 @@ bool JsonWriter::ReadJson(const char* path, void(*callback)(BitmapResult)) {
br.config = r["key"]["config"].asCString();
br.sourceType = r["key"]["source_type"].asCString();
br.ext = r["options"]["ext"].asCString();
- br.gammaCorrect = r["options"]["gamma_correct"].asBool();
+ br.gammaCorrect = 0 == strcmp("yes", r["options"]["gamma_correct"].asCString());
br.md5 = r["md5"].asCString();
if (!r["key"]["source_options"].isNull()) {