From ebe48409fd698e8f4d6996bca2a4b2ce8fc91e6b Mon Sep 17 00:00:00 2001 From: Fabien LOISON Date: Wed, 3 May 2017 11:40:00 +0200 Subject: [PATCH] allows generating poor quality JPEGs (q<84) --- guetzli/processor.cc | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/guetzli/processor.cc b/guetzli/processor.cc index 9986f9ed..2e621071 100644 --- a/guetzli/processor.cc +++ b/guetzli/processor.cc @@ -788,13 +788,14 @@ bool Processor::ProcessJpegData(const Params& params, const JPEGData& jpg_in, final_output_ = out; stats_ = stats; - if (params.butteraugli_target > 2.0f) { - fprintf(stderr, - "Guetzli should be called with quality >= 84, otherwise the\n" - "output will have noticeable artifacts. If you want to\n" - "proceed anyway, please edit the source code.\n"); - return false; - } + // XXX Disable this to allow generating poor quality JPEGs + // if (params.butteraugli_target > 2.0f) { + // fprintf(stderr, + // "Guetzli should be called with quality >= 84, otherwise the\n" + // "output will have noticeable artifacts. If you want to\n" + // "proceed anyway, please edit the source code.\n"); + // return false; + // } if (jpg_in.components.size() != 3 || !HasYCbCrColorSpace(jpg_in)) { fprintf(stderr, "Only YUV color space input jpeg is supported\n"); return false;