summaryrefslogtreecommitdiff
blob: 24eb9e010fca116b5bb52e24a890a11384cf8955 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Bug: https://bugs.gentoo.org/647422
Upstream Patch: https://sourceforge.net/p/freeimage/patches/130/

diff -Naur a/Source/FreeImage/PluginJPEG.cpp b/Source/FreeImage/PluginJPEG.cpp
--- a/Source/FreeImage/PluginJPEG.cpp	2018-03-24 23:24:11.062695375 -0400
+++ b/Source/FreeImage/PluginJPEG.cpp	2018-03-24 23:25:39.451124161 -0400
@@ -1586,14 +1586,14 @@
 
 			// thumbnail support (JFIF 1.02 extension markers)
 			if(FreeImage_GetThumbnail(dib) != NULL) {
-				cinfo.write_JFIF_header = 1; //<### force it, though when color is CMYK it will be incorrect
+				cinfo.write_JFIF_header = static_cast<boolean>(1); //<### force it, though when color is CMYK it will be incorrect
 				cinfo.JFIF_minor_version = 2;
 			}
 
 			// baseline JPEG support
 			if ((flags & JPEG_BASELINE) ==  JPEG_BASELINE) {
-				cinfo.write_JFIF_header = 0;	// No marker for non-JFIF colorspaces
-				cinfo.write_Adobe_marker = 0;	// write no Adobe marker by default				
+				cinfo.write_JFIF_header = static_cast<boolean>(0);	// No marker for non-JFIF colorspaces
+				cinfo.write_Adobe_marker = static_cast<boolean>(0);	// write no Adobe marker by default
 			}
 
 			// set subsampling options if required
diff -Naur a/Source/FreeImage.h b/Source/FreeImage.h
--- a/Source/FreeImage.h	2018-03-24 23:24:11.066695395 -0400
+++ b/Source/FreeImage.h	2018-03-24 23:26:35.945391182 -0400
@@ -117,12 +117,17 @@
 #ifndef _WINDOWS_
 #define _WINDOWS_
 
+#if JPEG_LIB_VERSION < 90
+
 #ifndef FALSE
 #define FALSE 0
 #endif
 #ifndef TRUE
 #define TRUE 1
 #endif
+
+#endif
+
 #ifndef NULL
 #define NULL 0
 #endif