Skip to content

GD extension phpinfo shows libJPEG Version unknown for libJPEG 10 #21431

@rainerjung

Description

@rainerjung

Description

File ext/gd/libgd/gd_jpeg.c contains:

const char * gdJpegGetVersionString()
{
        switch(JPEG_LIB_VERSION) {
                case 62:
                        return "6b";
                        break;

                case 70:
                        return "7";
                        break;

                case 80:
                        return "8";
                        break;

                case 90:
                        return "9 compatible";
                        break;

                default:
                        return "unknown";
        }
} 

Please add

                case 100:
                        return "10 compatible";
                        break;

LibJPEG 10 was released on January 25th, 2026. Its file jpeglib.h contains:

/* Version IDs for the JPEG library.
 * Might be useful for tests like "#if JPEG_LIB_VERSION >= 100".
 */

#define JPEG_LIB_VERSION        100     /* Compatibility version 10.0 */
#define JPEG_LIB_VERSION_MAJOR  10
#define JPEG_LIB_VERSION_MINOR  0

Thanks a lot.

PHP Version

8.5.4

Operating System

Any

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions