xinxinlx / openjpeg

Automatically exported from code.google.com/p/openjpeg
Other
0 stars 0 forks source link

asoc value of 65536 is allowed #321

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Cnf. :

[OpenJPEG] opj_decompress trunk refusing to decompress 4 band imagery

------------ start cdef -------------------
[0]c(0) typ(0) asoc(1)
[1]c(1) typ(0) asoc(2)
[2]c(2) typ(0) asoc(3)
[3]c(3) typ(65535) asoc(65535)
------------ end cdef ---------------------

The type value and asoc value of 65535 (2^16 - 1) is allowed:

ISO/IEC 15444-1:2002 (E)

Table I.16 ­ Typ[i] field values

2^16 ­1   The type of this channel is not specified.

Table I.17 ­ Asoc[i] field values

2^16­ 1   This channel is not associated with any particular colour.

Therefore insert the following line in
openjpeg-2.x-trunk-r2824, line 771:

    if (info[i].asoc >= 65535) continue;

The name of the function is 'opj_jp2_check_color() '.

winfried

Original issue reported on code.google.com by szukw...@arcor.de on 29 Mar 2014 at 8:22

GoogleCodeExporter commented 9 years ago
Sorry, a typo. Must run:

asoc value of 65535 is allowed

winfried

Original comment by szukw...@arcor.de on 30 Mar 2014 at 1:39

GoogleCodeExporter commented 9 years ago

Original comment by mathieu.malaterre on 31 Mar 2014 at 10:46