openjpeg icon indicating copy to clipboard operation
openjpeg copied to clipboard

Invalid decompression for Part-2 J2K

Open gcode-importer opened this issue 11 years ago • 5 comments

Originally reported on Google Code with ID 222

The attached J2K codestream is not decoded properly by OpenJPEG 1.5.1 or trunk.

Reported by malaterre on 2013-05-03 08:43:07


- _Attachment: [lena512_rot90.j2k](https://storage.googleapis.com/google-code-attachments/openjpeg/issue-222/comment-0/lena512_rot90.j2k)_

gcode-importer avatar May 03 '13 08:05 gcode-importer

Hello, Mathieu,

I had to change the code in j2k.c of the TRUNK.

NAME(lena512_rot90.j2k)
LENG(141603)

ENTER read_jp2c
[0]marker(0xff4f)
    soc len(0)
[2]marker(0xff51)
    siz len(41)
    capabilities(32768)
    x(0 : 512) y(1048065 : 1048577)
    xt(0 : 512) yt(1048065 : 512)
    nr_components(1)
TEST len(41)
    capabilities(32768)
    x(0 : 512) y(1048065 : 1048577)
    xt(0 : 512) yt(1048065 : 512)
    nr_components(1)
      component[0]signed(0) prec(8) hsep(1) vsep(1)

[45]marker(0xff52)

    read_cod

             max_len 12
          prog_order 0
           nr_layers 1
multi_comp_transform 0

       entropy_coder 0
      use_sop_marker 0
      use_eph_marker 0

      num_resolutions 6
     code_block_width 4
    code_block_height 4
     code_block_style 0
       transformation 1 (5-3 reversible)

The resulting image looks fuzzy. KDU creates a clean TIF file.

winfried

Reported by szukw000 on 2013-08-11 09:06:06

gcode-importer avatar Aug 11 '13 09:08 gcode-importer

The codestream is Part-2 compliant. OpenJPEG aims at providing a Part-1 compliant codec.
Changing priority for now.

Reported by malaterre on 2014-02-25 12:42:08

  • Labels added: Priority-Low
  • Labels removed: Priority-Medium

gcode-importer avatar Feb 25 '14 12:02 gcode-importer

Sample is here https://bugs.debian.org/826742 it should be decoded (by rather old kakadu) lena

ValZapod avatar Feb 08 '21 13:02 ValZapod

Duplicate of https://github.com/uclouvain/openjpeg/issues/794

malaterre avatar Feb 09 '21 06:02 malaterre

It is not a duplicate at all. We still want to support Part 2. ;) There just an error is nicely returned.

ValZapod avatar Feb 09 '21 12:02 ValZapod