Skip to content

Commit

Permalink
allows generating poor quality JPEGs (q<84)
Browse files Browse the repository at this point in the history
  • Loading branch information
flozz committed May 3, 2017
1 parent 467cb04 commit ebe4840
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions guetzli/processor.cc
Expand Up @@ -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;
Expand Down

0 comments on commit ebe4840

Please sign in to comment.