Browse Source

[Minor] Add HEIC files patterns

pull/5471/head
Vsevolod Stakhov 6 months ago
parent
commit
ad27730d47
No known key found for this signature in database GPG Key ID: 7647B6790081437
  1. 17
      lualib/lua_magic/patterns.lua
  2. 12
      lualib/lua_magic/types.lua

17
lualib/lua_magic/patterns.lua

@ -466,6 +466,23 @@ local patterns = {
},
}
},
heic = {
matches = {
{
-- HEIC/HEIF file format signature
-- Starts with ftyp followed by specific brand identifiers
string = "^....ftyphe[im][cs]",
relative_position = 0,
weight = 60,
},
{
-- Alternative signature for HEIC/HEIF
string = [[^....ftypmif1]],
relative_position = 0,
weight = 60,
},
}
},
}
return patterns

12
lualib/lua_magic/types.lua

@ -279,6 +279,16 @@ local types = {
ct = 'image/bmp',
av_check = false,
},
heic = {
type = 'image',
ct = 'image/heic',
av_check = false,
},
heif = {
type = 'image',
ct = 'image/heif',
av_check = false,
},
dwg = {
type = 'image',
ct = 'image/vnd.dwg',
@ -324,4 +334,4 @@ local types = {
},
}
return types
return types
Loading…
Cancel
Save