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 78
78
- **ico ** - ``image/x-icon ``
79
79
- **heic ** - ``image/heic ``
80
80
- **avif ** - ``image/avif ``
81
+ - **qoi ** - ``image/qoi ``
81
82
82
83
Video
83
84
^^^^^
Original file line number Diff line number Diff line change 30
30
image .Heic (),
31
31
image .Dcm (),
32
32
image .Avif (),
33
+ image .Qoi (),
33
34
)
34
35
35
36
# Supported video types
Original file line number Diff line number Diff line change @@ -381,3 +381,24 @@ def match(self, buf):
381
381
if major_brand in ['mif1' , 'msf1' ] and 'avif' in compatible_brands :
382
382
return True
383
383
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