Added libjpegturbo to check_feature

This commit is contained in:
Andrew Murray 2018-12-12 21:25:05 +11:00
parent 27c86baa56
commit 7172a44caa
2 changed files with 8 additions and 1 deletions

View File

@ -51,7 +51,8 @@ features = {
"webp_anim": ("PIL._webp", 'HAVE_WEBPANIM'),
"webp_mux": ("PIL._webp", 'HAVE_WEBPMUX'),
"transp_webp": ("PIL._webp", "HAVE_TRANSPARENCY"),
"raqm": ("PIL._imagingft", "HAVE_RAQM")
"raqm": ("PIL._imagingft", "HAVE_RAQM"),
"libjpegturbo": ("PIL._imaging", "HAVE_LIBJPEGTURBO")
}

View File

@ -3836,6 +3836,12 @@ setup_module(PyObject* m) {
}
#endif
#ifdef LIBJPEG_TURBO_VERSION
PyModule_AddObject(m, "HAVE_LIBJPEGTURBO", Py_True);
#else
PyModule_AddObject(m, "HAVE_LIBJPEGTURBO", Py_False);
#endif
#ifdef HAVE_LIBZ
/* zip encoding strategies */
PyModule_AddIntConstant(m, "DEFAULT_STRATEGY", Z_DEFAULT_STRATEGY);