mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-06-30 18:03:07 +03:00
Update src/PIL/VtfImagePlugin.py
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
This commit is contained in:
parent
f594d20623
commit
1eb30cf574
|
@ -391,7 +391,7 @@ def _save(im: Image.Image, fp: IO[bytes], filename: str | bytes) -> None:
|
|||
|
||||
|
||||
def _accept(prefix: bytes) -> bool:
|
||||
valid_header = prefix[:4] == b"VTF\x00"
|
||||
valid_header = prefix.startswith("VTF\x00")
|
||||
valid_version = struct.unpack_from("<2I", prefix, 4) >= (7, 0)
|
||||
return valid_header and valid_version
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user