Skip to content

Commit 6639100

Browse files
ajslaterradarhere
andauthored
Update src/PIL/WebPImagePlugin.py
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
1 parent 8bbe4aa commit 6639100

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/PIL/WebPImagePlugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
def _is_lossless(data: bytes) -> bool:
2626
# A WebP file is considered lossless when every coded frame uses the
2727
# VP8L bitstream. See https://developers.google.com/speed/webp/docs/riff_container
28-
if len(data) < 16 or data[:4] != b"RIFF" or data[8:12] != b"WEBP":
28+
if not _accept(data):
2929
return False
3030
chunk = data[12:16]
3131
if chunk == b"VP8L":

0 commit comments

Comments
 (0)