File tree Expand file tree Collapse file tree 3 files changed +23
-0
lines changed Expand file tree Collapse file tree 3 files changed +23
-0
lines changed Original file line number Diff line number Diff line change 7878- **ico ** - ``image/x-icon ``
7979- **heic ** - ``image/heic ``
8080- **avif ** - ``image/avif ``
81+ - **qoi ** - ``image/qoi ``
8182
8283Video
8384^^^^^
Original file line number Diff line number Diff line change 3030 image .Heic (),
3131 image .Dcm (),
3232 image .Avif (),
33+ image .Qoi (),
3334)
3435
3536# Supported video types
Original file line number Diff line number Diff line change @@ -381,3 +381,24 @@ def match(self, buf):
381381 if major_brand in ['mif1' , 'msf1' ] and 'avif' in compatible_brands :
382382 return True
383383 return False
384+
385+
386+ class Qoi (Type ):
387+ """
388+ Implements the QOI image type matcher.
389+ """
390+ MIME = 'image/qoi'
391+ EXTENSION = 'qoi'
392+
393+ def __init__ (self ):
394+ super (Qoi , self ).__init__ (
395+ mime = Qoi .MIME ,
396+ extension = Qoi .EXTENSION
397+ )
398+
399+ def match (self , buf ):
400+ return (len (buf ) > 3 and
401+ buf [0 ] == 0x71 and
402+ buf [1 ] == 0x6F and
403+ buf [2 ] == 0x69 and
404+ buf [3 ] == 0x66 )
You can’t perform that action at this time.
0 commit comments