changeset 2684:b53cefe3901c jobs

integration mainline->jobs
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 21 Jun 2018 09:32:42 +0200
parents 1bc4054ad96c (current diff) 964fb9a5786d (diff)
children 6801f99bbc2f
files
diffstat 2 files changed, 10 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/Core/Images/JpegReader.cpp	Thu Jun 21 08:06:58 2018 +0200
+++ b/Core/Images/JpegReader.cpp	Thu Jun 21 09:32:42 2018 +0200
@@ -49,7 +49,10 @@
                          std::string& content,
                          ImageAccessor& accessor)
   {
-    jpeg_read_header(&cinfo, TRUE);
+    // The "static_cast" is necessary on OS X:
+    // https://github.com/simonfuhrmann/mve/issues/371
+    jpeg_read_header(&cinfo, static_cast<boolean>(true));
+
     jpeg_start_decompress(&cinfo);
 
     PixelFormat format;
--- a/Core/Images/JpegWriter.cpp	Thu Jun 21 08:06:58 2018 +0200
+++ b/Core/Images/JpegWriter.cpp	Thu Jun 21 09:32:42 2018 +0200
@@ -96,8 +96,12 @@
     }
 
     jpeg_set_defaults(&cinfo);
-    jpeg_set_quality(&cinfo, quality, TRUE);
-    jpeg_start_compress(&cinfo, TRUE);
+
+    // The "static_cast" is necessary on OS X:
+    // https://github.com/simonfuhrmann/mve/issues/371
+    jpeg_set_quality(&cinfo, quality, static_cast<boolean>(true));
+    jpeg_start_compress(&cinfo, static_cast<boolean>(true));
+    
     jpeg_write_scanlines(&cinfo, &lines[0], height);
     jpeg_finish_compress(&cinfo);
     jpeg_destroy_compress(&cinfo);