Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

say where this came from

  • Loading branch information...
commit 7b44e3fce44949fa50767f9c3cfa161df1a7022a 1 parent e45cd30
@zoulasc zoulasc authored
Showing with 15 additions and 2 deletions.
  1. +15 −2 magic/Magdir/jpeg
17 magic/Magdir/jpeg
@@ -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 <>
-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 <>
+# Added sub-entries for JP2, JPX, JPM and MJ2 formats; added mimetypes
+# 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 <>

2 comments on commit 7b44e3f


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 <>
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.


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

Please sign in to comment.
Something went wrong with that request. Please try again.