mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-10-31 07:57:27 +03:00 
			
		
		
		
	Merge pull request #3493 from radarhere/libjpegturbo
Added libjpeg_turbo to check_feature
This commit is contained in:
		
						commit
						2659edae9d
					
				|  | @ -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"), | ||||
|     "libjpeg_turbo": ("PIL._imaging", "HAVE_LIBJPEGTURBO"), | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
|  | @ -73,6 +73,10 @@ | |||
| 
 | ||||
| #include "Python.h" | ||||
| 
 | ||||
| #ifdef HAVE_LIBJPEG | ||||
| #include "jconfig.h" | ||||
| #endif | ||||
| 
 | ||||
| #ifdef HAVE_LIBZ | ||||
| #include "zlib.h" | ||||
| #endif | ||||
|  | @ -3836,6 +3840,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); | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user