#pragma comment( lib, "FreeImage.lib" )
#endif
#elif defined(HAVE_WINCODEC)
- //#include <initguid.h>
#include <wincodec.h>
+ // prevent warnings on MSVC10
+ #include <Standard_WarningsDisable.hxx>
+ #include <Standard_TypeDef.hxx>
+ #include <Standard_WarningsRestore.hxx>
#undef min
#undef max
#endif
#include <TCollection_AsciiString.hxx>
#include <TCollection_ExtendedString.hxx>
#include <OSD_OpenFile.hxx>
+
#include <fstream>
#include <algorithm>
return false;
}
+ if (FreeImage_GetBPP (anImage) == 1)
+ {
+ FIBITMAP* aTmpImage = FreeImage_ConvertTo8Bits (anImage);
+ FreeImage_Unload (anImage);
+ anImage = aTmpImage;
+ }
+
Image_Format aFormat = convertFromFreeFormat (FreeImage_GetImageType(anImage),
FreeImage_GetColorType(anImage),
FreeImage_GetBPP (anImage));