Index: FreeImage/FreeImage.2008.vcproj =================================================================== --- FreeImage/FreeImage.2008.vcproj +++ FreeImage/FreeImage.2008.vcproj 2015-09-04 17:47:08.617486591 +0200 @@ -832,10 +832,6 @@ > </File> <File - RelativePath="Source\FreeImageToolkit\JPEGTransform.cpp" - > - </File> - <File RelativePath="Source\FreeImageToolkit\MultigridPoissonSolver.cpp" > </File> Index: FreeImage/gensrclist.sh =================================================================== --- FreeImage/gensrclist.sh +++ FreeImage/gensrclist.sh 2015-09-04 17:47:14.670298938 +0200 @@ -12,7 +12,6 @@ egrep 'RelativePath=.*\.(c|cpp)' $DIR/*.2008.vcproj | cut -d'"' -f2 | tr '\\' '/' | awk '{print "'$DIR'/"$0}' | tr '\r\n' ' ' | tr -s ' ' >> Makefile.srcs fi done -echo -n ' Source/LibJPEG/transupp.c' >> Makefile.srcs echo >> Makefile.srcs echo -n "INCLS = " >> Makefile.srcs Index: FreeImage/Source/FreeImage.h =================================================================== --- FreeImage/Source/FreeImage.h +++ FreeImage/Source/FreeImage.h 2015-09-04 17:47:08.618486560 +0200 @@ -42,10 +42,10 @@ #else #if defined(_WIN32) || defined(__WIN32__) #define DLL_CALLCONV __stdcall - // The following ifdef block is the standard way of creating macros which make exporting + // The following ifdef block is the standard way of creating macros which make exporting // from a DLL simpler. All files within this DLL are compiled with the FREEIMAGE_EXPORTS // symbol defined on the command line. this symbol should not be defined on any project - // that uses this DLL. This way any other project whose source files include this file see + // that uses this DLL. This way any other project whose source files include this file see // DLL_API functions as being imported from a DLL, wheras this DLL sees symbols // defined with this macro as being exported. #ifdef FREEIMAGE_EXPORTS @@ -53,7 +53,7 @@ #else #define DLL_API __declspec(dllimport) #endif // FREEIMAGE_EXPORTS - #else + #else // try the gcc visibility support (see http://gcc.gnu.org/wiki/Visibility) #if defined(__GNUC__) && ((__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) #ifndef GCC_HASCLASSVISIBILITY @@ -65,7 +65,7 @@ #define DLL_API __attribute__ ((visibility("default"))) #else #define DLL_API - #endif + #endif #endif // WIN32 / !WIN32 #endif // FREEIMAGE_LIB @@ -195,20 +195,20 @@ typedef struct tagBITMAPINFOHEADER{ DWORD biSize; - LONG biWidth; - LONG biHeight; - WORD biPlanes; + LONG biWidth; + LONG biHeight; + WORD biPlanes; WORD biBitCount; - DWORD biCompression; - DWORD biSizeImage; - LONG biXPelsPerMeter; - LONG biYPelsPerMeter; - DWORD biClrUsed; + DWORD biCompression; + DWORD biSizeImage; + LONG biXPelsPerMeter; + LONG biYPelsPerMeter; + DWORD biClrUsed; DWORD biClrImportant; -} BITMAPINFOHEADER, *PBITMAPINFOHEADER; +} BITMAPINFOHEADER, *PBITMAPINFOHEADER; -typedef struct tagBITMAPINFO { - BITMAPINFOHEADER bmiHeader; +typedef struct tagBITMAPINFO { + BITMAPINFOHEADER bmiHeader; RGBQUAD bmiColors[1]; } BITMAPINFO, *PBITMAPINFO; @@ -222,7 +222,7 @@ #pragma pack(1) #endif // WIN32 -/** 48-bit RGB +/** 48-bit RGB */ typedef struct tagFIRGB16 { WORD red; @@ -358,7 +358,7 @@ #define FIICC_DEFAULT 0x00 #define FIICC_COLOR_IS_CMYK 0x01 -FI_STRUCT (FIICCPROFILE) { +FI_STRUCT (FIICCPROFILE) { WORD flags; // info flag DWORD size; // profile's size measured in bytes void *data; // points to a block of contiguous memory containing the profile @@ -458,6 +458,11 @@ FID_BAYER16x16 = 6 // Bayer ordered dispersed dot dithering (order 4 dithering matrix) }; +/* The FreeImage_JPEGTransform functions are deliberately disabled in the + Mageia build of FreeImage as they require that FreeImage uses a private copy + of libjpeg which is a no go because of security reasons */ +#if 0 + /** Lossless JPEG transformations Constants used in FreeImage_JPEGTransform */ @@ -472,6 +477,8 @@ FIJPEG_OP_ROTATE_270 = 7 // 270-degree clockwise (or 90 ccw) }; +#endif + /** Tone mapping operators. Constants used in FreeImage_ToneMapping. */ @@ -481,7 +488,7 @@ FITMO_FATTAL02 = 2 // Gradient domain high dynamic range compression (R. Fattal, 2002) }; -/** Upsampling / downsampling filters. +/** Upsampling / downsampling filters. Constants used in FreeImage_Rescale. */ FI_ENUM(FREE_IMAGE_FILTER) { @@ -517,22 +524,22 @@ Note: RATIONALs are the ratio of two 32-bit integer values. */ FI_ENUM(FREE_IMAGE_MDTYPE) { - FIDT_NOTYPE = 0, // placeholder - FIDT_BYTE = 1, // 8-bit unsigned integer - FIDT_ASCII = 2, // 8-bit bytes w/ last byte null - FIDT_SHORT = 3, // 16-bit unsigned integer - FIDT_LONG = 4, // 32-bit unsigned integer - FIDT_RATIONAL = 5, // 64-bit unsigned fraction - FIDT_SBYTE = 6, // 8-bit signed integer - FIDT_UNDEFINED = 7, // 8-bit untyped data - FIDT_SSHORT = 8, // 16-bit signed integer - FIDT_SLONG = 9, // 32-bit signed integer - FIDT_SRATIONAL = 10, // 64-bit signed fraction - FIDT_FLOAT = 11, // 32-bit IEEE floating point - FIDT_DOUBLE = 12, // 64-bit IEEE floating point - FIDT_IFD = 13, // 32-bit unsigned integer (offset) - FIDT_PALETTE = 14, // 32-bit RGBQUAD - FIDT_LONG8 = 16, // 64-bit unsigned integer + FIDT_NOTYPE = 0, // placeholder + FIDT_BYTE = 1, // 8-bit unsigned integer + FIDT_ASCII = 2, // 8-bit bytes w/ last byte null + FIDT_SHORT = 3, // 16-bit unsigned integer + FIDT_LONG = 4, // 32-bit unsigned integer + FIDT_RATIONAL = 5, // 64-bit unsigned fraction + FIDT_SBYTE = 6, // 8-bit signed integer + FIDT_UNDEFINED = 7, // 8-bit untyped data + FIDT_SSHORT = 8, // 16-bit signed integer + FIDT_SLONG = 9, // 32-bit signed integer + FIDT_SRATIONAL = 10, // 64-bit signed fraction + FIDT_FLOAT = 11, // 32-bit IEEE floating point + FIDT_DOUBLE = 12, // 64-bit IEEE floating point + FIDT_IFD = 13, // 32-bit unsigned integer (offset) + FIDT_PALETTE = 14, // 32-bit RGBQUAD + FIDT_LONG8 = 16, // 64-bit unsigned integer FIDT_SLONG8 = 17, // 64-bit signed integer FIDT_IFD8 = 18 // 64-bit unsigned integer (offset) }; @@ -687,9 +694,9 @@ #define JPEG_QUALITYAVERAGE 0x0400 // save with average quality (25:1) #define JPEG_QUALITYBAD 0x0800 // save with bad quality (10:1) #define JPEG_PROGRESSIVE 0x2000 // save as a progressive-JPEG (use | to combine with other save flags) -#define JPEG_SUBSAMPLING_411 0x1000 // save with high 4x1 chroma subsampling (4:1:1) +#define JPEG_SUBSAMPLING_411 0x1000 // save with high 4x1 chroma subsampling (4:1:1) #define JPEG_SUBSAMPLING_420 0x4000 // save with medium 2x2 medium chroma subsampling (4:2:0) - default value -#define JPEG_SUBSAMPLING_422 0x8000 // save with low 2x1 chroma subsampling (4:2:2) +#define JPEG_SUBSAMPLING_422 0x8000 // save with low 2x1 chroma subsampling (4:2:2) #define JPEG_SUBSAMPLING_444 0x10000 // save with no chroma subsampling (4:4:4) #define JPEG_OPTIMIZE 0x20000 // on saving, compute optimal Huffman coding tables (can reduce a few percent of file size) #define JPEG_BASELINE 0x40000 // save basic JPEG, without metadata or any markers @@ -767,9 +774,9 @@ // Message output functions ------------------------------------------------- typedef void (*FreeImage_OutputMessageFunction)(FREE_IMAGE_FORMAT fif, const char *msg); -typedef void (DLL_CALLCONV *FreeImage_OutputMessageFunctionStdCall)(FREE_IMAGE_FORMAT fif, const char *msg); +typedef void (DLL_CALLCONV *FreeImage_OutputMessageFunctionStdCall)(FREE_IMAGE_FORMAT fif, const char *msg); -DLL_API void DLL_CALLCONV FreeImage_SetOutputMessageStdCall(FreeImage_OutputMessageFunctionStdCall omf); +DLL_API void DLL_CALLCONV FreeImage_SetOutputMessageStdCall(FreeImage_OutputMessageFunctionStdCall omf); DLL_API void DLL_CALLCONV FreeImage_SetOutputMessage(FreeImage_OutputMessageFunction omf); DLL_API void DLL_CALLCONV FreeImage_OutputMessageProc(int fif, const char *fmt, ...); @@ -1050,8 +1057,14 @@ DLL_API FIBITMAP *DLL_CALLCONV FreeImage_RotateEx(FIBITMAP *dib, double angle, double x_shift, double y_shift, double x_origin, double y_origin, BOOL use_mask); DLL_API BOOL DLL_CALLCONV FreeImage_FlipHorizontal(FIBITMAP *dib); DLL_API BOOL DLL_CALLCONV FreeImage_FlipVertical(FIBITMAP *dib); + +/* The FreeImage_JPEGTransform functions are deliberately disabled in the + Mageia build of FreeImage as they require that FreeImage uses a private copy + of libjpeg which is a no go because of security reasons */ +#if 0 DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransform(const char *src_file, const char *dst_file, FREE_IMAGE_JPEG_OPERATION operation, BOOL perfect FI_DEFAULT(FALSE)); DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformU(const wchar_t *src_file, const wchar_t *dst_file, FREE_IMAGE_JPEG_OPERATION operation, BOOL perfect FI_DEFAULT(FALSE)); +#endif // upsampling / downsampling DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Rescale(FIBITMAP *dib, int dst_width, int dst_height, FREE_IMAGE_FILTER filter); @@ -1081,8 +1094,14 @@ DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Copy(FIBITMAP *dib, int left, int top, int right, int bottom); DLL_API BOOL DLL_CALLCONV FreeImage_Paste(FIBITMAP *dst, FIBITMAP *src, int left, int top, int alpha); DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Composite(FIBITMAP *fg, BOOL useFileBkg FI_DEFAULT(FALSE), RGBQUAD *appBkColor FI_DEFAULT(NULL), FIBITMAP *bg FI_DEFAULT(NULL)); + +/* The FreeImage_JPEGTransform functions are deliberately disabled in the + Mageia build of FreeImage as they require that FreeImage uses a private copy + of libjpeg which is a no go because of security reasons */ +#if 0 DLL_API BOOL DLL_CALLCONV FreeImage_JPEGCrop(const char *src_file, const char *dst_file, int left, int top, int right, int bottom); DLL_API BOOL DLL_CALLCONV FreeImage_JPEGCropU(const wchar_t *src_file, const wchar_t *dst_file, int left, int top, int right, int bottom); +#endif DLL_API BOOL DLL_CALLCONV FreeImage_PreMultiplyWithAlpha(FIBITMAP *dib); // background filling routines