davisking / dlib

A toolkit for making real world machine learning and data analysis applications in C++
http://dlib.net
Boost Software License 1.0
13.57k stars 3.38k forks source link

Fix incorrect version check for libgif #2936

Closed PowerLay closed 7 months ago

PowerLay commented 7 months ago

This PR addresses an issue in the handling of API differences between various versions of the libgif library. Previously, the version check only accounted for the major version number, specifically checking if the GIFLIB_MAJOR version was 5 or higher. This approach did not correctly handle the API changes introduced in libgif version 5.1.0, leading to compilation issues with versions 5.0.X, where the API differences are still relevant.

The proposed change enhances the version check to consider both the major and minor version numbers. This ensures that the specific API changes introduced in version 5.1.0 and onwards are accurately accounted for, thus maintaining compatibility with version 5.0.X and addressing the compilation issues encountered.

davisking commented 7 months ago

Nice, thanks.