Commit 9d8849fa authored by Bastien Nocera's avatar Bastien Nocera

Correct JPEG2000 definition

*.jpc and *.j2k relate to JPEG 2000 codestreams, not to JPEG 2000
images, so remove those globs.

Remove the jP magic, as it creates false positives (and add a test for
that). Also add the jp2 string magic.

With help from Steve Fosdick <other@fosdick.me.uk>

https://bugs.freedesktop.org/show_bug.cgi?id=11942
parent 99446c51
......@@ -3969,16 +3969,17 @@ command to generate the output files.
<_comment>JPEG-2000 image</_comment>
<alias type="image/jpeg2000"/>
<alias type="image/jpx"/>
<alias type="image/jpeg2000-image"/>
<alias type="image/x-jpeg2000-image"/>
<magic priority="50">
<match value="jP" type="string" offset="4" />
<match value="\xFF\x4F\xFF\x51\x00" type="string" offset="0" />
<match type="big32" value="0x0c6a5020" offset="3"/>
<match type="string" value="jp2" offset="20"/>
</magic>
<glob pattern="*.jp2"/>
<glob pattern="*.jpc"/>
<glob pattern="*.jpx"/>
<glob pattern="*.j2k"/>
<glob pattern="*.jpf"/>
</mime-type>
<mime-type type="image/openraster">
<_comment>OpenRaster archiving image</_comment>
......
......@@ -25,7 +25,8 @@ test.ilbm image/x-ilbm
test.im1 image/x-sun-raster x
test.jp2 image/jp2
test.jpg image/jpeg
test.jpc image/jp2
# Possible false positive for a JPEG 2000 image
img_5304.jpg image/jpeg
# From https://bugzilla.freedesktop.org/show_bug.cgi?id=55339
test.mng video/x-mng
test.pat image/x-pat xxx
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment