magika
magika copied to clipboard
[NEW CONTENT TYPE REQUEST] High Efficiency Image File Format (.HEIF)
Expected
Most if not all HEIF images are classified as sample1.heic: MP4 media file (video). I'm expecting a MIME type of image/heif and High Efficiency Image Format still (image).
Not sure if this needs to be a new content type or a misdetection so apologies if this is the wrong ticket type. It's close but possibly "inaccurate". Here is the output from exiftool with the source file from https://filesamples.com/formats/heic
[
{
"SourceFile": "sample1.heic",
"ExifToolVersion": 12.76,
"FileName": "sample1.heic",
"Directory": ".",
"FileSize": "294 kB",
"FileModifyDate": "2024:02:27 15:52:50-08:00",
"FileAccessDate": "2024:02:27 15:58:37-08:00",
"FileInodeChangeDate": "2024:02:27 15:57:01-08:00",
"FilePermissions": "-rw-r--r--",
"FileType": "HEIF",
"FileTypeExtension": "heif",
"MIMEType": "image/heif",
"MajorBrand": "High Efficiency Image Format still image (.HEIF)",
"MinorVersion": "0.0.0",
"CompatibleBrands": [
"mif1",
"heic"
],
"HandlerType": "Picture",
"PrimaryItemReference": 1002,
"HEVCConfigurationVersion": 1,
"GeneralProfileSpace": "Conforming",
"GeneralTierFlag": "Main Tier",
"GeneralProfileIDC": "Main",
"GenProfileCompatibilityFlags": "Main 10, Main",
"ConstraintIndicatorFlags": "0 0 0 0 0 0",
"GeneralLevelIDC": "186 (level 6.2)",
"MinSpatialSegmentationIDC": 0,
"ParallelismType": 0,
"ChromaFormat": "4:2:0",
"BitDepthLuma": 8,
"BitDepthChroma": 8,
"AverageFrameRate": 0,
"ConstantFrameRate": "Unknown",
"NumTemporalLayers": 1,
"TemporalIDNested": "Yes",
"ImageWidth": 1440,
"ImageHeight": 960,
"ImageSpatialExtent": "1440x960",
"MediaDataSize": 293066,
"MediaDataOffset": 542,
"ImageSize": "1440x960",
"Megapixels": 1.4
}
]
What type of file would you like magika to detect?
- High Efficiency Image File Format (.HEIF)
What software can create/open these files?
- Most photo editors (Apple Preview, Apple Photos, et al)
Where can these files be found?
- https://filesamples.com/formats/heic
If possible, please provide a specification for this file type.
- https://en.wikipedia.org/wiki/High_Efficiency_Image_File_Format
Additional context
magika --generate-report sample1.heic
########################################
### REPORT ###
########################################
{
"version": "0.5.0",
"model_dir_name": "standard_v1",
"python_version": "3.11.7 (main, Dec 4 2023, 18:10:11) [Clang 15.0.0 (clang-1500.1.0.2.5)]",
"reports": [
{
"hash": "00d9e0636b645036f77b3809fcd26a29df71b9ee66f2865fd8729b894aeabf59",
"features": "{\"beg\":[0,0,0,24,102,116,121,112,109,105,102,49,0,0,0,0,109,105,102,49,104,101,105,99,0,0,1,254,109,101,116,97,0,0,0,0,0,0,0,33,104,100,108,114,0,0,0,0,0,0,0,0,112,105,99,116,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,112,105,116,109,0,0,0,0,3,234,0,0,0,52,105,108,111,99,0,0,0,0,68,64,0,2,3,234,0,0,0,0,2,22,0,1,0,0,0,8,0,4,106,128,3,237,0,0,0,0,2,22,0,1,0,4,106,136,0,0,14,74,0,0,0,76,105,105,110,102,0,0,0,0,0,2,0,0,0,31,105,110,102,101,2,0,0,0,3,234,0,0,104,118,99,49,72,69,86,67,32,73,109,97,103,101,0,0,0,0,31,105,110,102,101,2,0,0,0,3,237,0,0,104,118,99,49,72,69,86,67,32,73,109,97,103,101,0,0,0,0,26,105,114,101,102,0,0,0,0,0,0,0,14,116,104,109,98,3,237,0,1,3,234,0,0,1,41,105,112,114,112,0,0,1,7,105,112,99,111,0,0,0,108,104,118,99,67,1,1,96,0,0,0,0,0,0,0,0,0,186,240,0,252,253,248,248,0,0,15,3,160,0,1,0,24,64,1,12,1,255,255,1,96,0,0,3,0,0,3,0,0,3,0,0,3,0,186,240,36,161,0,1,0,31,66,1,1,1,96,0,0,3,0,0,3,0,0,3,0,0,3,0,186,160,2,208,128,60,31,229,249,36,109,158,217,162,0,1,0,7,68,1,193,144,149,129,18,0,0,0,20,105,115,112,101,0,0,0,0,0,0,5,160,0,0,3,192,0,0,0,107,104,118,99,67,1,1,96,0,0,0,0,0,0,0,0,0,186,240,0,252,253,248,248,0,0,15,3,160,0,1,0,24,64,1,12,1,255,255,1,96,0,0,3,0,0,3,0,0,3,0,0,3,0,186,240,36,161,0,1,0,30,66,1,1,1,96,0,0,3,0,0,3,0,0,3,0,0,3,0,186,160,30,32,40,127,151,228,145,182,123,100,162,0,1,0,7,68,1,193,144,149,129,18,0,0,0,20,105,115,112,101,0,0,0,0,0,0,0,240,0,0,0,160,0,0,0,26],\"mid\":[48,173,164,51,37,122,96,35,13,119,163,9,180,163,28,5,186,83,240,95,104,125,245,18,156,25,232,162,134,60,158,78,86,237,52,34,165,217,242,12,5,183,174,4,252,206,57,233,89,92,142,88,237,90,154,122,194,227,3,22,39,175,140,112,182,48,34,89,252,7,121,102,31,113,36,36,12,23,107,225,65,218,206,56,238,217,198,101,182,228,226,81,232,110,214,100,140,191,58,109,178,65,179,35,174,65,125,0,162,70,132,191,251,155,0,222,185,16,186,242,133,233,223,169,149,213,162,84,88,253,33,174,67,85,134,104,134,122,74,235,180,127,193,35,244,232,90,26,184,3,242,200,207,89,63,92,15,177,63,58,195,169,6,126,17,206,15,153,249,156,100,238,203,134,210,41,242,61,11,146,16,227,18,220,189,53,112,216,174,146,3,67,244,231,85,121,255,159,240,149,252,253,108,165,142,255,183,10,153,168,144,47,237,250,27,243,103,149,173,224,54,117,17,212,118,122,139,8,188,44,117,175,195,37,92,78,248,178,220,206,233,100,186,222,54,93,90,175,174,88,172,207,53,12,60,230,17,96,214,9,188,234,10,176,229,166,86,140,130,10,203,223,243,118,109,1,96,244,178,170,225,152,218,241,175,100,170,63,160,163,5,38,155,161,23,195,138,215,193,41,134,65,234,138,118,183,89,96,72,235,60,38,146,153,245,156,102,181,211,52,41,42,183,226,134,79,190,238,153,218,119,53,41,154,128,101,119,165,56,85,126,48,190,189,234,13,77,184,116,22,7,220,51,188,90,154,203,52,115,135,118,103,250,40,251,188,142,87,166,128,92,42,79,95,133,251,69,228,209,157,123,249,178,195,128,116,95,129,111,220,142,204,19,84,138,47,170,150,248,54,151,99,18,42,251,216,206,132,216,183,119,28,199,194,165,78,73,197,37,25,232,78,14,151,62,228,52,213,201,18,81,220,7,195,167,124,206,238,129,56,181,188,216,140,253,160,19,12,230,4,217,5,152,163,164,91,221,36,213,88,225,7,74,192,155,42,39,50,154,10,97,223,153,127,73,30,229,194,78,201,124,65,67,55,184,206,128,218,39,245,75,254,67,105,242,170,82,206,70,19,59,131,145,16,147,28,24,42,239,79,118,246],\"end\":[60,165,42,29,65,175,5,27,26,212,149,72,134,181,184,229,255,95,169,94,110,116,146,36,78,191,62,160,36,118,5,128,2,37,192,35,252,51,113,42,46,34,201,226,36,122,14,17,57,89,41,241,177,184,234,129,57,84,132,197,30,44,188,156,174,164,158,239,99,191,143,131,228,100,112,54,116,208,18,80,142,134,253,133,240,208,126,205,215,6,240,31,106,183,159,195,73,139,113,69,28,127,66,34,40,83,114,87,215,146,156,209,56,156,91,90,211,165,149,200,34,172,128,87,255,5,202,201,205,181,163,177,123,110,42,199,252,71,33,110,1,244,57,160,36,188,3,0,251,4,12,237,124,106,215,172,203,174,207,121,153,206,134,209,110,185,16,108,224,20,191,233,143,202,239,84,167,70,197,228,58,211,205,184,29,239,217,135,175,51,35,210,209,186,236,147,60,143,95,207,15,74,24,69,145,53,38,182,21,120,72,43,223,129,71,22,232,42,228,74,115,103,175,17,212,203,228,199,218,131,230,149,202,12,243,228,104,234,106,183,41,215,27,7,65,239,188,236,105,117,72,136,105,223,76,179,0,168,95,148,130,69,79,168,111,37,196,47,226,168,147,125,68,141,143,223,96,33,57,139,133,103,19,84,116,177,76,206,105,60,78,192,102,135,137,213,49,2,156,80,142,191,164,118,4,206,32,50,249,49,31,122,176,136,225,138,247,222,88,191,77,45,33,113,232,90,139,97,102,94,245,185,208,38,188,227,207,59,128,88,32,44,39,5,65,145,24,192,110,121,87,35,120,198,21,236,237,47,253,210,46,93,34,170,62,211,37,243,63,158,41,203,176,98,14,138,135,255,214,23,18,105,147,47,219,110,231,117,191,23,83,185,219,5,65,170,127,187,90,185,208,128,103,112,0,17,76,77,71,207,165,149,157,118,65,152,64,183,10,131,125,93,253,54,58,235,113,145,39,183,252,110,242,159,127,124,129,77,188,70,140,171,123,94,161,80,92,251,81,120,140,174,49,92,173,175,12,192,231,178,16,172,192,227,129,101,100,202,77,51,41,227,108,192,207,248,189,137,124,159,247,174,97,137,209,128,137,7,17,92,11,206,187,154,195,189,194,42,118,188,254,252,234,249,75,120,47,223,168,172,18,158]}",
"result": {
"path": "<REMOVED>",
"dl": {
"ct_label": "mp4",
"score": 1.0,
"group": "video",
"mime_type": "video/mp4",
"magic": "ISO Media",
"description": "MP4 media file"
},
"output": {
"ct_label": "mp4",
"score": 1.0,
"group": "video",
"mime_type": "video/mp4",
"magic": "ISO Media",
"description": "MP4 media file"
}
}
}
]
}