Skip to content

Commit

Permalink
TIKA-4037 -- add detection for os2 bitmap arrays.
Browse files Browse the repository at this point in the history
  • Loading branch information
tballison committed May 10, 2023
1 parent 92fb29e commit 5323f9e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5642,8 +5642,21 @@
<match value="0x762F310102040000" type="string" offset="0"/>
</magic>
<glob pattern="*.exr"/>
</mime-type>
</mime-type>

<mime-type type="image/x-os2-graphics; charset=binary">
<_comment>OS2 bitmap array</_comment>
<tika:link>http://fileformats.archiveteam.org/wiki/OS/2_Bitmap_Array</tika:link>
<magic priority="50">
<match value="BA" type="string" offset="0">
<match value="BM" type="string" offset="14"/>
<match value="CI" type="string" offset="14"/>
<match value="IC" type="string" offset="14"/>
<match value="CP" type="string" offset="14"/>
<match value="PT" type="string" offset="14"/>
</match>
</magic>
</mime-type>
<mime-type type="image/bmp">
<alias type="image/x-bmp"/>
<alias type="image/x-ms-bmp"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,11 @@ public void testBmpDetection() throws Exception {
assertType("text/plain", "testBMPfp.txt");
}

@Test
public void testOS2BitmapArray() throws Exception {
assertTypeByData("image/x-os2-graphics; charset=binary", "testOS2BitmapArray");
}

@Test
public void testPnmDetection() throws Exception {
assertType("image/x-portable-bitmap", "testPBM.pbm");
Expand Down
Binary file not shown.

0 comments on commit 5323f9e

Please sign in to comment.