自分用にカスタマイズしたshared-mime-infoのソース
Revision | 250253ec0de3bc8ba414ea187fa4148031f6366e (tree) |
---|---|
Time | 2017-06-11 09:03:12 |
Author | Martin Blanchard <tchaik@gmx....> |
Commiter | Bastien Nocera |
Better JPEG 2000 MIME type support
Enhance JPEG 2000 MIME type support by distinguishing subtypes:
See RFC 3745 for details, MIME types and extensions.
Test files, except MJ2, contributed by Johan van der Knijff
at https://github.com/bitsgalore/jp2kMagic
@@ -4493,21 +4493,57 @@ command to generate the output files. | ||
4493 | 4493 | <glob pattern="*.jpe"/> |
4494 | 4494 | <alias type="image/pjpeg"/> |
4495 | 4495 | </mime-type> |
4496 | + <mime-type type="image/x-jp2-codestream"> | |
4497 | + <_comment>JPEG-2000 codestream</_comment> | |
4498 | + <magic priority="50"> | |
4499 | + <match type="big32" value="0xff4fff51" offset="0"/> | |
4500 | + </magic> | |
4501 | + <glob pattern="*.j2c"/> | |
4502 | + <glob pattern="*.j2k"/> | |
4503 | + <glob pattern="*.jpc"/> | |
4504 | + </mime-type> | |
4496 | 4505 | <mime-type type="image/jp2"> |
4497 | - <_comment>JPEG-2000 image</_comment> | |
4506 | + <_comment>JPEG-2000 JP2 image</_comment> | |
4507 | + <acronym>JP2</acronym> | |
4508 | + <expanded-acronym>JPEG-2000</expanded-acronym> | |
4498 | 4509 | <alias type="image/jpeg2000"/> |
4499 | - <alias type="image/jpx"/> | |
4500 | 4510 | <alias type="image/jpeg2000-image"/> |
4501 | 4511 | <alias type="image/x-jpeg2000-image"/> |
4502 | 4512 | <magic priority="50"> |
4503 | - <match value="\xFF\x4F\xFF\x51\x00" type="string" offset="0" /> | |
4504 | - <match type="big32" value="0x0c6a5020" offset="3"/> | |
4505 | - <match type="string" value="jp2" offset="20"/> | |
4513 | + <match type="string" mask="0xffffffffffffffffffffffff0000000000000000ffffffff" value="\x00\x00\x00\x0c\x6a\x50\x20\x20\x0d\x0a\x87\x0a jp2\x20" offset="0"/> | |
4506 | 4514 | </magic> |
4507 | 4515 | <glob pattern="*.jp2"/> |
4508 | - <glob pattern="*.jpx"/> | |
4516 | + <glob pattern="*.jpg2"/> | |
4517 | + </mime-type> | |
4518 | + <mime-type type="image/jpx"> | |
4519 | + <_comment>JPEG-2000 JPX image</_comment> | |
4520 | + <acronym>JPX</acronym> | |
4521 | + <expanded-acronym>JPEG-2000 eXtended</expanded-acronym> | |
4522 | + <magic priority="50"> | |
4523 | + <match type="string" mask="0xffffffffffffffffffffffff0000000000000000ffffffff" value="\x00\x00\x00\x0c\x6a\x50\x20\x20\x0d\x0a\x87\x0a jpx\x20" offset="0"/> | |
4524 | + </magic> | |
4509 | 4525 | <glob pattern="*.jpf"/> |
4510 | - | |
4526 | + <glob pattern="*.jpx"/> | |
4527 | + </mime-type> | |
4528 | + <mime-type type="image/jpm"> | |
4529 | + <_comment>JPEG-2000 JPM image</_comment> | |
4530 | + <acronym>JPM</acronym> | |
4531 | + <expanded-acronym>JPEG-2000 Mixed</expanded-acronym> | |
4532 | + <magic priority="50"> | |
4533 | + <match type="string" mask="0xffffffffffffffffffffffff0000000000000000ffffffff" value="\x00\x00\x00\x0c\x6a\x50\x20\x20\x0d\x0a\x87\x0a jpm\x20" offset="0"/> | |
4534 | + </magic> | |
4535 | + <glob pattern="*.jpm"/> | |
4536 | + <glob pattern="*.jpgm"/> | |
4537 | + </mime-type> | |
4538 | + <mime-type type="video/mj2"> | |
4539 | + <_comment>JPEG-2000 MJ2 video</_comment> | |
4540 | + <acronym>MJ2</acronym> | |
4541 | + <expanded-acronym>Motion JPEG-2000</expanded-acronym> | |
4542 | + <magic priority="50"> | |
4543 | + <match type="string" mask="0xffffffffffffffffffffffff0000000000000000ffffffff" value="\x00\x00\x00\x0c\x6a\x50\x20\x20\x0d\x0a\x87\x0a mjp2" offset="0"/> | |
4544 | + </magic> | |
4545 | + <glob pattern="*.mj2"/> | |
4546 | + <glob pattern="*.mjp2"/> | |
4511 | 4547 | </mime-type> |
4512 | 4548 | <mime-type type="image/openraster"> |
4513 | 4549 | <_comment>OpenRaster archiving image</_comment> |
@@ -23,10 +23,15 @@ test.ico image/vnd.microsoft.icon | ||
23 | 23 | # From https://bugs.freedesktop.org/show_bug.cgi?id=20070#c3 |
24 | 24 | test.ilbm image/x-ilbm |
25 | 25 | test.im1 image/x-sun-raster x |
26 | -test.jp2 image/jp2 | |
27 | 26 | test.jpg image/jpeg |
28 | 27 | # Possible false positive for a JPEG 2000 image |
29 | 28 | img_5304.jpg image/jpeg |
29 | +# From https://github.com/bitsgalore/jp2kMagic | |
30 | +balloon.j2c image/x-jp2-codestream | |
31 | +balloon.jp2 image/jp2 | |
32 | +balloon.jpf image/jpx | |
33 | +balloon.jpm image/jpm | |
34 | +balloon.mj2 video/mj2 | |
30 | 35 | # From https://bugzilla.freedesktop.org/show_bug.cgi?id=55339 |
31 | 36 | test.mng video/x-mng |
32 | 37 | test.pat image/x-pat xxx |