Permalink
Browse files

say where this came from

  • Loading branch information...
zoulasc committed Aug 1, 2012
1 parent e45cd30 commit 7b44e3fce44949fa50767f9c3cfa161df1a7022a
Showing with 15 additions and 2 deletions.
  1. +15 −2 magic/Magdir/jpeg
View
@@ -1,6 +1,6 @@
#------------------------------------------------------------------------------
-# $File: jpeg,v 1.15 2009/09/19 16:28:10 christos Exp $
+# $File: jpeg,v 1.17 2012/08/01 12:11:01 christos Exp $
# JPEG images
# SunOS 5.5.1 had
#
@@ -153,7 +153,20 @@
0 string hsi1 JPEG image data, HSI proprietary
# From: David Santinoli <david@santinoli.com>
-0 string \x00\x00\x00\x0C\x6A\x50\x20\x20\x0D\x0A\x87\x0A JPEG 2000 image data
+0 string \x00\x00\x00\x0C\x6A\x50\x20\x20\x0D\x0A\x87\x0A JPEG 2000
+# From: Johan van der Knijff <johan.vanderknijff@kb.nl>
+# Added sub-entries for JP2, JPX, JPM and MJ2 formats; added mimetypes
+# https://github.com/bitsgalore/jp2kMagic
+#
+# Now read value of 'Brand' field, which yields a few possibilities:
+>20 string \x6a\x70\x32\x20 Part 1 (JP2)
+!:mime image/jp2
+>20 string \x6a\x70\x78\x20 Part 2 (JPX)
+!:mime image/jpx
+>20 string \x6a\x70\x6d\x20 Part 6 (JPM)
+!:mime image/jpm
+>20 string \x6d\x6a\x70\x32 Part 3 (MJ2)
+!:mime video/mj2
# Type: JPEG 2000 codesream
# From: Mathieu Malaterre <mathieu.malaterre@gmail.com>

2 comments on commit 7b44e3f

@bitsgalore

This comment has been minimized.

Show comment Hide comment
@bitsgalore

bitsgalore Aug 8, 2012

Be aware that there's another JPEG 2000 Codestream definition by Petr Splichal in the images magic file which may cause problems:

`

JPEG 2000 Code Stream Bitmap

From Petr Splichal psplicha@redhat.com

0 string \xFF\x4F\xFF\x51\x00 JPEG-2000 Code Stream Bitmap data`

Apparently this one has priority over Mathieu Malaterre's one in the current jpeg file. However, the final \x00 byte in Petr's entry really shouldn't be there, as this byte is part of a variable (Lsiz) which may have any other value (which will happen for very large images). So maybe that one should be removed, or otherwise corrected.

Mathieu's entry looks fine, even though I don't quite understand the second (45 beshort 0xff52) line. Alternatively you could use a corrected version of Petr's one which is at the bottom of the latest version of my entry (I added this earlier this week as I wasn't aware of this problem when I initially contributed it).

I hope this helps.

Be aware that there's another JPEG 2000 Codestream definition by Petr Splichal in the images magic file which may cause problems:

`

JPEG 2000 Code Stream Bitmap

From Petr Splichal psplicha@redhat.com

0 string \xFF\x4F\xFF\x51\x00 JPEG-2000 Code Stream Bitmap data`

Apparently this one has priority over Mathieu Malaterre's one in the current jpeg file. However, the final \x00 byte in Petr's entry really shouldn't be there, as this byte is part of a variable (Lsiz) which may have any other value (which will happen for very large images). So maybe that one should be removed, or otherwise corrected.

Mathieu's entry looks fine, even though I don't quite understand the second (45 beshort 0xff52) line. Alternatively you could use a corrected version of Petr's one which is at the bottom of the latest version of my entry (I added this earlier this week as I wasn't aware of this problem when I initially contributed it).

I hope this helps.

@glensc

This comment has been minimized.

Show comment Hide comment
@glensc

glensc Aug 8, 2012

Member

do not comment the commits on github. maintainer is not tracking them. this is just git mirror:

Mirror of file CVS repository, updated nightly. NOTE: do not make pull requests here, submit them usual way to bug tracker or to the mailing list. — Read more
http://www.darwinsys.com/file/

Member

glensc replied Aug 8, 2012

do not comment the commits on github. maintainer is not tracking them. this is just git mirror:

Mirror of file CVS repository, updated nightly. NOTE: do not make pull requests here, submit them usual way to bug tracker or to the mailing list. — Read more
http://www.darwinsys.com/file/

Please sign in to comment.