Closed GoogleCodeExporter closed 9 years ago
I have tested these files and found, that the original file
is broken. It does not start with a J2K MAGIC but with a
JP2 MAGIC. What follows is junk.
--------------------------------------------------------
#define JP2_RFC3745_MAGIC "\x00\x00\x00\x0c\x6a\x50\x20\x20\x0d\x0a\x87\x0a"
#define JP2_MAGIC "\x0d\x0a\x87\x0a"
#define J2K_CODESTREAM_MAGIC "\xff\x4f\xff\x51"
------------------ test_original -----------------------
read_j2k:
NOT A J2K FILE: test_original.j2k
0x00,0x00,0x00,0x0c, <== JP2_RFC3745_MAGIC part1
0x6a,0x50,0x20,0x20, <== JP2_RFC3745_MAGIC part2
0x0d,0x0a,0x87,0x0a, <== JP2_RFC3745_MAGIC part3
0x00,0x00,0x00,0xff, <== box_len
0x00,0x00,0x00,0x00, <== box_name
read_jp2:
NAME(test_original.j2k)
LENG(2963)
BOX_NAME(OÿQ) BOX_LEN(255)
BOX_NAME(^O~X,^_) BOX_LEN(2898778123)
The first box_name should be 'ftyp' (0x66,0x74,0x79,0x70)
e.g. :
NAME(file2.jp2)
LENG(452004)
BOX_NAME(ftyp) BOX_LEN(24)
brand(jp2 ) minv(0)
CL[0]()
CL[1](jp2 )
BOX_NAME(jp2h) BOX_LEN(73)
BOX_NAME(ihdr) BOX_LEN(22)
--------------- test_changed ----------------------
read_j2k:
NAME(test_changed.j2k)
LENG(2948)
ENTER read_jp2c
marker(0xff4f) <== J2K_CODESTREAM_MAGIC part1
soc len(0)
marker(0xff51) <== J2K_CODESTREAM_MAGIC part2
siz len(47)
capabilities(0)
x(0 : 134) y(0 : 165)
xt(0 : 134) yt(0 : 165)
nr_components(3)
component[0]signed(0) prec(8) hsep(1) vsep(1)
component[1]signed(0) prec(8) hsep(1) vsep(1)
component[2]signed(0) prec(8) hsep(1) vsep(1)
---------------------------------------------------
winfried
Original comment by szukw...@arcor.de
on 2 Aug 2011 at 8:23
test_original.j2k is not a valid JPEG 2000 file. What should openjpeg support
it ? Closing issue.
Original comment by mathieu.malaterre
on 11 Jan 2012 at 9:42
Original issue reported on code.google.com by
matthias...@gmail.com
on 2 Aug 2011 at 12:24Attachments: