[php-src] Issue #21431: GD extension phpinfo shows libJPEG Version unknown for libJPEG 10
[email protected] (rainerjung)
| Newsgroups | php.bugs |
|---|---|
| Message-ID | <[email protected]> |
Issue: https://github.com/php/php-src/issues/21431
Author: 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
```plain
8.5.4
```
### Operating System
Any