Page 1 of 1

ImageMagick reports error JP2WarningHandler/236

Posted: 2017-03-29T02:13:29-07:00
by joshua01
Hello,

Version ImageMagick 7.0.5-4 Q16 x64 (Windows 7) reports this in one image jp2, when commands identify -verbose or convert are run:

identify: No imsbtree created.
'OpenJP2' @ warning/jp2.c/JP2WarningHandler/236
identify: tgt_create tree->numnodes ==0, no tree created.
'OpenJP2' @ warning/jp2.c/JP2WarningHandler/236
identify: No incltree created

When i run opj_dump on the image i dont see any difference from other image which is o.k.
I assume this image is somehow broken, did google it, but did not find any clear answer.
The image opens fine in editor, i am able to convert it to tiff and png, when i convert the tiff back to jp2 it reports the same error.
I just wonder how serious is this error, if i have to scan this picture again.

The image https://owncloud.cesnet.cz/index.php/s/zprFrkcu8wv6yv8
-image was created from tiff by Kakadu codec

Edit: I tried opj_decompress to tiff and it reports the same error as ImageMagick, so there must really be something wrong with the image

Edit 2: here http://gs-bugs.ghostscript.narkive.com/ ... l-of-a-pdf they suggest, that it may be some bug in openjpeg.

Re: ImageMagick reports error JP2WarningHandler/236

Posted: 2017-03-29T08:33:30-07:00
by joshua01
Still dont know more about the error itself, but I guess I managed to do something with the image. I did convert the jp2 image with imagemagick to tif (the same errors are reported) and then the resulted tif i converted again to jp2 and this jp2 seems ok. Magick identify -verbose and opj_decompress (to tif) dont report anything like the errors before, the image seems o.k. Checked with ImageMagick metric PSNR and MAE and the first jp2 with errors and the last jp2 without them are identical. Hope it helps someone.

But i am still interested about the meaning of the first reported errors.

Re: ImageMagick reports error JP2WarningHandler/236

Posted: 2017-03-29T09:22:00-07:00
by snibgo
Those aren't errors, merely warnings. IM had all the information it needed to do the job. Warnings often mean "There is something weird about this file. Not weird enough to make it invalid, just a bit strange."

IM is usually stricter than other software, at pointing out oddities when the file is within spec, or rejecting it when it is out of spec.

As a general rule, warnings can be ignored.

Re: ImageMagick reports error JP2WarningHandler/236

Posted: 2017-03-29T09:52:40-07:00
by fmw42
You can turn off warnings by adding -quiet right after the word magick in IM 7 command lines.

Re: ImageMagick reports error JP2WarningHandler/236

Posted: 2017-03-30T00:45:12-07:00
by joshua01
Thank you both! Yes it was actually warning, i missed that. I will probably turn it of if it is not so serious.

I just wonder, if this warning, can mean something for example in 20, 30 years. I mean, if ImageMagick is strict and follow exactly some spec but other sw does not, may it be that future apps will follow the specs so exactly as IM and therefore there will be some problem with the image.