tika-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TIKA-2658) Add magic numbers of Olympus ORF Files
Date Wed, 05 Sep 2018 19:59:00 GMT

    [ https://issues.apache.org/jira/browse/TIKA-2658?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16604858#comment-16604858
] 

ASF GitHub Bot commented on TIKA-2658:
--------------------------------------

Gagravarr closed pull request #239: TIKA-2658: add olympus raw file magic numbers
URL: https://github.com/apache/tika/pull/239
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml b/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml
index 104cd2ce7..41ba203f4 100644
--- a/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml
+++ b/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml
@@ -5678,6 +5678,9 @@
 
   <mime-type type="image/x-raw-olympus">
     <_comment>Olympus raw image</_comment>
+    <magic priority="50">
+      <match offset="0" type="string" value="\x49\x49\x52\x4F"/>
+    </magic>
     <glob pattern="*.orf"/>
   </mime-type>
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Add magic numbers of Olympus ORF Files
> --------------------------------------
>
>                 Key: TIKA-2658
>                 URL: https://issues.apache.org/jira/browse/TIKA-2658
>             Project: Tika
>          Issue Type: Improvement
>          Components: detector
>    Affects Versions: 1.18
>            Reporter: Selim Dincer
>            Priority: Minor
>
> For Olympus Raw Files (.ORF) there aren't any magic numbers specified in the tika-mimetypes.xml
file. When I adjust the xml to look like following it works:
> {code:java}
> <mime-type type="image/x-raw-olympus">
>   <_comment>Olympus raw image</_comment>
>   <magic priority="50">
>     <match offset="0" type="string" value="\x49\x49\x52\x4F"/>
>   </magic>
>   <glob pattern="*.orf"/>
> </mime-type>
> {code}
> I tested this with files from my Olympus E-PL7, my Olympus E-M5 Mark II and some Olympus
E-M1 Mark II raw files I found on the internet (the most recent camera). The content type
changes from octet stream to image/x-raw-olympus as expected.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message