mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-11-04 09:57:43 +03:00 
			
		
		
		
	moved _webp into the PIL namespace
This commit is contained in:
		
							parent
							
								
									088c752e40
								
							
						
					
					
						commit
						8295e33390
					
				| 
						 | 
					@ -1,7 +1,7 @@
 | 
				
			||||||
from PIL import Image
 | 
					from PIL import Image
 | 
				
			||||||
from PIL import ImageFile
 | 
					from PIL import ImageFile
 | 
				
			||||||
from io import BytesIO
 | 
					from io import BytesIO
 | 
				
			||||||
import _webp
 | 
					from PIL import _webp
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def _accept(prefix):
 | 
					def _accept(prefix):
 | 
				
			||||||
    return prefix[:4] == b"RIFF" and prefix[8:16] == b"WEBPVP8 "
 | 
					    return prefix[:4] == b"RIFF" and prefix[8:16] == b"WEBPVP8 "
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3,7 +3,7 @@ from tester import *
 | 
				
			||||||
from PIL import Image
 | 
					from PIL import Image
 | 
				
			||||||
 | 
					
 | 
				
			||||||
try:
 | 
					try:
 | 
				
			||||||
    import _webp
 | 
					    from PIL import _webp
 | 
				
			||||||
except:
 | 
					except:
 | 
				
			||||||
    skip('webp support not installed')
 | 
					    skip('webp support not installed')
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										2
									
								
								setup.py
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								setup.py
									
									
									
									
									
								
							| 
						 | 
					@ -330,7 +330,7 @@ class pil_build_ext(build_ext):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if os.path.isfile("_webp.c") and feature.webp:
 | 
					        if os.path.isfile("_webp.c") and feature.webp:
 | 
				
			||||||
            exts.append(Extension(
 | 
					            exts.append(Extension(
 | 
				
			||||||
                "_webp", ["_webp.c"], libraries=["webp"]))
 | 
					                "PIL._webp", ["_webp.c"], libraries=["webp"]))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if sys.platform == "darwin":
 | 
					        if sys.platform == "darwin":
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user