Menu

C++17 Support / Updated Dependancies for next FreeImage 4.0.0?

Developers
2022-01-16
2022-03-07
  • Daniel Rosser

    Daniel Rosser - 2022-01-16

    Hi FreeImage Devs,

    Is there any current plans to upgrade dependancies to stable releases: we are very behind in versions for a lot of these?
    LibPNG, LibJPEG, OpenEXR, LibTIFF4, LibOpenJPEG, LibWebP, ZLib

    Is there any current plan to support C++17 and new standards, at least compiling with the flag

    I have patched a version of 3.18.0 to basically support this however I had to remove the very outdated OpenEXR and some elements of ILM's code

    https://github.com/danoli3/FreeImage/tree/3.18.0_cpp17

    Kind Regards,
    Dan

     
  • Daniel Rosser

    Daniel Rosser - 2022-01-16

    These are the kinds of errors when trying to compile 3.18.0 with new standards

    In file included from Source/FreeImage/PluginEXR.cpp:33:
    502
    In file included from Source/FreeImage/../OpenEXR/IlmImf/ImfOutputFile.h:46:
    503
    In file included from Source/OpenEXR/IlmImf/ImfHeader.h:51:
    504
    Source/OpenEXR/Imath/ImathVec.h:228:34: error: ISO C++17 does not allow dynamic exception specifications [-Wdynamic-exception-spec]
    505
        const Vec2 &        normalizeExc () throw (IEX_NAMESPACE::MathExc);
    506
                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    507
    Source/OpenEXR/Imath/ImathVec.h:228:34: note: use 'noexcept(false)' instead
    508
        const Vec2 &        normalizeExc () throw (IEX_NAMESPACE::MathExc);
    509
                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    510
                                            noexcept(false)
    
     
    • Pellaeon

      Pellaeon - 2022-01-21

      I had the same issues with 3.18.0. I commented out all the throws where the compiler complained about and I replaced auto_ptr with shared_ptr. For the last one, you have to do a workaround for the old release calls of auto_ptr. After this, you can compile the code with C++17.

       
  • Nia Bickford (NVIDIA)

    Hi Dan! I've coincidentally also been working on updating the version of OpenEXR FreeImage uses, and have put together a patch updating it to OpenEXR 3.1.3 in patch 151 - maybe this could help? Thanks!

     
  • Daniel Rosser

    Daniel Rosser - 2022-01-28

    Awesome Neil!

    Yeah we really need to get FreeImage 4.0 going as we are the building block for so many Engines / Unreal / Unity / openFrameworks https://freeimage.sourceforge.io/users.html and there are a lot of CVE's in the old dependancies here that have been patched externally that need inclusion in the next version pronto else

    Very Quick Audit of FreeImage 3.18.0 ...

    LibPNG (1.6.16) : CVE-2019-7317, CVE-2018-14048, CVE-2018-14550
    LibTIFF (4.0.4) : CVE-2011-0192, CVE-2019-14973, CVE-2019-14973, CVE-2018-19210, CVE-2018-18661, CVE-2018-10779
    LibRaw (0.17.a1), CVE-2020-15503, CVE-2018-20363, CVE-2018-20364, CVE-2018-20365, CVE-2017-14348, CVE-2017-13735, CVE-2017-14265
    LibWebP (0.4.2), CVE-2018-25012, CVE-2020-36328
    OpenEXR (2.2.0). CVE-2021-20296, CVE-2021-3479, CVE-2021-3478

    Cornerstone of the industry right here, summon core FreeImage Devs
    @cklein05 @drolon @noescom @detlevv @ark42

     
  • Carsten Klein

    Carsten Klein - 2022-01-28

    Hi there,

    I'm with you and will try to support a new version 4.0 of FreeImage. Although I've been contributing some small new features to the library written in C/C++, my main focus was always on the VB6 wrapper (as well on the C# .NET wrapper, as long as C# was an option in my software company).

    However, I'm still here and willing to help with new versions and the VB6 wrapper, at least.

    BTW, for my mind, FreeImage version 4.0 should be hosted on an official GitHub repository and not longer on SF.

    Carsten

     
    👍
    1
  • Daniel Rosser

    Daniel Rosser - 2022-01-30
    Post awaiting moderation.
  • Daniel Rosser

    Daniel Rosser - 2022-03-07

    Updates ? GitHub Repo ? Status ? Strategies ??

     

Log in to post a comment.