c++pluginsfreeimage

C++ How to disable plugins in FreeImage?


I've searched the web on how to do it but I can't find anything about how someone could disable certain plugins in FreeImage. Reading the Changelog I see that it's possible but I can't find any documentation. For example I don't need EXR (which needs OpenEXR), JXR (which needs LibJXR) and a few other libraries that could reduce the size on my executable and I also don't need them.

Does anyone know how to disable FreeImage plugins at compile time ?


Solution

  • Do you can disable then in the Plugin.cpp file, inside Source/Plugin directory.

    In this file there a function FreeImage_Initialise that initialize the plugins.

    You also do not need to compile the libraries, there a low dependency between PluginTIFF.cpp and OpenEXR, that is the file half.cpp.

    Plugins initialization list