jasper-software / jasper

Official Repository for the JasPer Image Coding Toolkit
http://www.ece.uvic.ca/~mdadams/jasper
Other
217 stars 103 forks source link

help "jpc_dec_decode pkts failed" #359

Closed jennif56l closed 11 months ago

jennif56l commented 11 months ago

Good morning I am currently working on a small project where I have to read GRIB2 files, the data part is compressed in jpeg2000 with jasper 1.900.1. I use so this version for decompression but that does not work every time and I can't understand why. On some files everything is ok and on others it returns me "jpc_dec_decode pkts failed" when I go up the program I realize that the problem comes when executing "jpc_t2cod.c" Do you have any idea what could be causing the problem? I attach a file thank you in advance for your help 20230726.18.012.zip

jubalh commented 11 months ago

JasPer 1.900.1 is ages old, it also contains many security issues. You should use at least 2.0.19. But please use the latest release and report back if you still got this issue.

mdadams commented 11 months ago

@jennif56l You provided a GRIB file. JasPer cannot process such files directly. So, this file is not helpful as a reproducer for the problem. Also, as @jubalh noted, JasPer 1.900.1 is ancient and obsolete, and you should be using a much newer version of JasPer. Unless you can confirm that the problem that you are having is still present in the most recent version of JasPer and provide a JPC or JP2 file reproducer for the problem, there is not anything that can be done with regard to this issue.

jennif56l commented 11 months ago

thank you for your answers so I downloaded version 2.0.33 but after some tests I get the same error

mdadams commented 11 months ago

Version 2.0.33 is still extremely old, as JasPer is currently at version 4.0.0. In any case, the Zip archive that you provided contains only a GRB file. JasPer cannot process such files directly. So, this file is not helpful at all for reproducing the problem that your are encountering.

jennif56l commented 11 months ago

read_grib2.zip

I am attaching this I don't know if it can help you, I have just tested with version 4.0 but I have an error "LNK2019: unresolved external symbol" which I have not solved yet, I am using visual studio 2022 thank you again for your time

mdadams commented 11 months ago

What I would need in order to have any hope of reproducing the problem you are seeing is a JPC or JP2 file that contains whatever you are trying to decode with JasPer when you are getting a failure. Unfortunately, you have not provided this so far.

jennif56l commented 11 months ago

i have extracted what i am trying to decode to a file but how can i know if it is a jpc or jp2 in the grib2 documentation it says it is a JPEG 2000 code stream as described in Part 1 of the JPEG 2000 Standard (ISO/IEC 15444-1:2000) 20230727.zip

mdadams commented 11 months ago

I am able to decode the jpc image 20230727.jpc with the most recent version of JasPer. I do not get any errors. For example, I am able to get information for 20230727.jpc using the imginfo program. Also, I am able to view the image with the jiv program. So, whatever problem you are having, it is apparently fixed in the most recent version of JasPer on the master branch as well as in version 4.0.0. For this reason, I am closing this issue.