shibukawa / imagesize_py

MIT License
222 stars 43 forks source link

webp support #50

Closed dreamflasher closed 2 years ago

dreamflasher commented 2 years ago

Could you include webp support? Thank you!

ExtReMLapin commented 2 years ago
        elif head.startswith(b"RIFF") and head[8:12] == b"WEBP":
            # enter VP8 chunk
            fhandle.seek(26)
            width = struct.unpack("<H", fhandle.read(2))[0]
            height = struct.unpack("<H", fhandle.read(2))[0]
ExtReMLapin commented 2 years ago

52

shibukawa commented 2 years ago

1.4.0 includes webp support. Thank you @ExtReMLapin