fdintino / pillow-avif-plugin

A pillow plugin that adds avif support via libavif
BSD 2-Clause "Simplified" License
90 stars 13 forks source link

Some files are not recognized. #13

Closed alexsilva closed 2 months ago

alexsilva commented 2 years ago

Many "fox.profile..." files from sample repositories are not recognized https://github.com/link-u/avif-sample-images

PIL.UnidentifiedImageError: cannot identify image file '.../plum-blossom-small-profile2-12bpc-yuv444-alpha-limited-monochrome.avif'

Is there any additional configuration to resolve this?

CTimmerman commented 4 months ago

Not sure if same type, but this and more AVIF files from https://www.rferl.org/a/russia-children-taken-ukraine/32527298.html aren't recognized:

tiv_mhtml_image8_fail.zip

LewisCowlesMotive commented 3 months ago

https://dsqze93rovfg.cloudfront.net/ekpqf6v4fvfzzn7ea2jgq7bxcu.avif is not recognised as an AVIF; but I see an AVIF header if I get it, and raise_for_status; and drop to a debugger to verify that the response status code is 200

Update: by using

import pillow_avif

then:

pillow_avif.AvifImagePlugin.AvifImageFile(io.BytesIO(response.content))

I get:

SyntaxError('Failed to decode image: BMFF parsing failed')