From c102fb2690678a5e23de45af3f1c476708008560 Mon Sep 17 00:00:00 2001 From: AbdealiJK Date: Sun, 5 Jun 2016 23:38:09 +0530 Subject: [PATCH] save_jpeg: Use TRUE instead of true In some verisons on jpeg, TRUE is an enum, and so `true` fails because it is not of the enum's type. Now, all the libjpeg calls use TRUE/FALSE. Fixes https://github.com/davisking/dlib/issues/129 --- dlib/image_saver/save_jpeg.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dlib/image_saver/save_jpeg.cpp b/dlib/image_saver/save_jpeg.cpp index 9fc816e4b..0d649ec7f 100644 --- a/dlib/image_saver/save_jpeg.cpp +++ b/dlib/image_saver/save_jpeg.cpp @@ -86,8 +86,8 @@ namespace dlib cinfo.input_components = 3; cinfo.in_color_space = JCS_RGB; jpeg_set_defaults(&cinfo); - jpeg_set_quality (&cinfo, quality, true); - jpeg_start_compress(&cinfo, true); + jpeg_set_quality (&cinfo, quality, TRUE); + jpeg_start_compress(&cinfo, TRUE); // now write out the rows one at a time while (cinfo.next_scanline < cinfo.image_height) { @@ -148,8 +148,8 @@ namespace dlib cinfo.input_components = 1; cinfo.in_color_space = JCS_GRAYSCALE; jpeg_set_defaults(&cinfo); - jpeg_set_quality (&cinfo, quality, true); - jpeg_start_compress(&cinfo, true); + jpeg_set_quality (&cinfo, quality, TRUE); + jpeg_start_compress(&cinfo, TRUE); // now write out the rows one at a time while (cinfo.next_scanline < cinfo.image_height) {