mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-13 18:56:17 +03:00
Merge pull request #5724 from radarhere/accept
This commit is contained in:
commit
ffde039f26
|
@ -269,9 +269,9 @@ Image.register_decoder("DXT1", DXT1Decoder)
|
|||
Image.register_decoder("DXT5", DXT5Decoder)
|
||||
|
||||
|
||||
def _validate(prefix):
|
||||
def _accept(prefix):
|
||||
return prefix[:4] == b"DDS "
|
||||
|
||||
|
||||
Image.register_open(DdsImageFile.format, DdsImageFile, _validate)
|
||||
Image.register_open(DdsImageFile.format, DdsImageFile, _accept)
|
||||
Image.register_extension(DdsImageFile.format, ".dds")
|
||||
|
|
|
@ -21,9 +21,8 @@
|
|||
from . import Image, ImageFile, JpegImagePlugin
|
||||
from ._binary import i16be as i16
|
||||
|
||||
|
||||
def _accept(prefix):
|
||||
return JpegImagePlugin._accept(prefix)
|
||||
# def _accept(prefix):
|
||||
# return JpegImagePlugin._accept(prefix)
|
||||
|
||||
|
||||
def _save(im, fp, filename):
|
||||
|
|
Loading…
Reference in New Issue
Block a user