Open GoogleCodeExporter opened 8 years ago
Original comment by mathieu.malaterre
on 25 Feb 2014 at 11:08
confirmed over here. Here is what I have:
$ ./bin/opj_compress -i 500px.png -o kaputt.jp2
[ERROR] Number of resolutions is too high in comparison to the size of tiles
failed to encode image: opj_start_compress
failed to encode image: opj_encode
failed to encode image: opj_end_compress
failed to encode image
Original comment by mathieu.malaterre
on 25 Feb 2014 at 11:09
The following will work:
opj_compress -n 5 -i 500px.png -o kaputt.jp2
but this one will fails:
opj_compress -n 6 -i 500px.png -o kaputt.jp2
For some reason openjpeg reject the second case since dimension of PNG is
$ pnginfo 500px.png | head -2
500px.png...
Image Width: 71 Image Length: 35
In which case 35 is smaller than 2^6 (64)
Original comment by mathieu.malaterre
on 25 Feb 2014 at 11:17
openjpeg 1.5 seems to handle the number of resolutions of 6 quite nicely.
Original comment by mathieu.malaterre
on 25 Feb 2014 at 11:18
Original comment by mathieu.malaterre
on 25 Feb 2014 at 4:25
Original comment by mathieu.malaterre
on 27 Feb 2014 at 11:21
Original comment by mathieu.malaterre
on 3 Mar 2014 at 8:09
Original comment by mathieu.malaterre
on 14 Mar 2014 at 2:03
Tried to encode a 32x32 image with Kakadu for levels 0 to 32 (-n 1 to 33 for
OpenJPEG) => no complain.
Tried to decode with opj_decompress those images :
- 0 to 5, OK, no complain.
- 6 to 30, OK, warning in tgt_create tree->numnodes == 0, no tree created.
- 31, OK, same warning but in dwt decode, we can see negative x0, x1, y0, y1
for the first resolution decoded (leading to a 1x1 block which is probably why
result is OK)
- 32, KO, same warnings
Trying to encode the same image with OpenJPEG using levels 0 to 32 (-n 1 to 33)
(removing the checks):
- 0 to 5, OK, no complain.
- 6 to 18, 20 to 28, 30 to 31, OK, warning in tgt_create tree->numnodes == 0,
no tree created.
- 19, 29 : same warning, no error but image colors are off...
- 32 : heap-buffer-overflow src/lib/openjp2/dwt.c:291 opj_dwt_encode_1
I will only update to correct the check which doesn't take into account the
adjustment by 1.
Original comment by m.darb...@gmail.com
on 19 Dec 2014 at 10:23
This issue was updated by revision r2963.
Original comment by m.darb...@gmail.com
on 19 Dec 2014 at 10:56
This issue was updated by revision r2964.
Original comment by m.darb...@gmail.com
on 19 Dec 2014 at 10:56
Original issue reported on code.google.com by
szukw...@arcor.de
on 29 Mar 2013 at 12:56Attachments: