I'm not sure what the project's stance on this is but this sort of thing is a common issue for package managers in general. for reference: https://github.com/microsoft/vcpkg/tree/master/ports/freeimage https://sources.debian.org/patches/freeimage/3.18.0+ds2-1/
FWIW, it looks related to this check in: https://sourceforge.net/p/freeimage/svn/1809/
Notes: - FreeImage.h line 132 defines WINDOWS macro - guiddef.h line 44 uses if to set the GUID structure - PluginJXR.cpp line 1022 uses IsEqualGUID to compare input and output formats - guiddef.h line 184 shows it is defined in terms of memcmp - debugging shows the type is 24-bytes long rather than 16 Source\FreeImage.h 131 #ifndef _WINDOWS_ 132 #define _WINDOWS_ 133 134 #ifndef FALSE 135 #define FALSE 0 136 #endif 137 #ifndef TRUE 138 #define TRUE 1 139 #endif 140 #ifndef NULL 141 #define NULL...
Notes: FreeImage.h line 132 defines WINDOWS macro guiddef.h line 44 uses if to set the GUID structure PluginJXR.cpp line 1022 uses IsEqualGUID to compare input and output formats guiddef.h line 184 shows it is defined in terms of memcmp * debugging shows the type is 24-bytes long rather than 16 Source\FreeImage.h 131 #ifndef _WINDOWS_ 132 #define _WINDOWS_ 133 134 #ifndef FALSE 135 #define FALSE 0 136 #endif 137 #ifndef TRUE 138 #define TRUE 1 139 #endif 140 #ifndef NULL 141 #define NULL 0 142 #endif...
Notes: FreeImage.h line 132 defines WINDOWS macro guiddef.h line 44 uses if to set the GUID structure PluginJXR.cpp line 1022 uses IsEqualGUID to compare input and output formats guiddef.h line 184 shows it is defined in terms of memcmp * debugging shows the type is 24-bytes long rather than 16 Source\FreeImage.h 131 #ifndef _WINDOWS_ 132 #define _WINDOWS_ 133 134 #ifndef FALSE 135 #define FALSE 0 136 #endif 137 #ifndef TRUE 138 #define TRUE 1 139 #endif 140 #ifndef NULL 141 #define NULL 0 142 #endif...
Notes: FreeImage.h line 132 defines _WINDOWS_ guiddef.h line 44 uses if to set the GUID structure PluginJXR.cpp line 1022 uses IsEqualGUID to compare input and output formats guiddef.h line 184 shows it is defined in terms of memcmp * debugging shows the type is 24-bytes long rather than 16 Source\FreeImage.h 131 #ifndef _WINDOWS_ 132 #define _WINDOWS_ 133 134 #ifndef FALSE 135 #define FALSE 0 136 #endif 137 #ifndef TRUE 138 #define TRUE 1 139 #endif 140 #ifndef NULL 141 #define NULL 0 142 #endif...
FreeImage_GetPixelColor can't set the pointer for you in this case. It is taking the pointer by value (that is, it passes a copy of the pointer you pass). Things might be different if it took a pointer to pointer or a reference to a pointer. I believe the expected behavior is for FreeImage_GetPixelColor to write the color to the RGBQUAD pointed at by the pointer you pass. I would try creating a local RGBQUAD and passing its address as the pointer.
Something I just noticed is that the call to FreeImage_GetPixelColor is passing an uninitialized pointer for the RGBQUAD. //RGBQUAD *rgb1; RGBQUAD rgb1; ... //if(!FreeImage_GetPixelColor(image, (unsigned) x, (unsigned) y, rgb1)) { if(!FreeImage_GetPixelColor(image, (unsigned) x, (unsigned) y, &rgb1)) { ... }