From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; rv:1.7.3) Gecko/20041001 Firefox/0.10.1 Description of problem: There are several problems and I have been in touch with the developer Bryan Henderson < bryanh > trying to debug them. Basically, the jasper library that is used in netpbm is too old and incompatible with 64 bit machines. I'll go some of the solved some problems more specifically: 1) pamtojpeg2k with a '-compression' level set will crash the program. 2) when compiling NetPBM on AMD64 you need to add the -fPIC CFLAG 3) Even if 1 and 2 work, if you have a 64 bit machine the jasper library will just kill everything. 4) If you build and link your own jasper you have to remember to link the jpeg libraries. Add -ljpeg to the linker options. Working with Bryan, we have resolved all of the above bugs. The fixes, I am told, will be included in the next netpbm release. So hold on to your panties. I'm currently working on the following.... Assuming you have built and linked your own jasper library... 1) Running pamtojpeg2k seems to work but crashes at the end complaining about a file descriptor 2) Running jpeg2ktopam complains that it ran out of memory Version-Release number of selected component (if applicable): netpbm-10.26 How reproducible: Always Steps to Reproduce: For problem 1 listed in summary For 1) RUN: pamtojpeg2k -compression {insert a float here} For 2) BUILD: netbpm on an AMD64 without the -fPIC CFLAG For 3) Fix 1 and 2 and then try running pamtojpeg2k For 4) Build your own jasper library and link it then try to make netpbm Additional info:
NOTE: These are 64-bit specific issues. I have an AMD64 and can confirm their existance. I cannot confirm if it occurs on other 64 bit systems.
I did another prerelease of netpbm-10.26.4, what is just built to solve this issue. Thanks, Jindrich
I have fixed the following two issues. 1) "Running pamtojpeg2k ... file descriptor" was caused by a call to close the file descriptor stdout. It probably varies from system to system, but in general you cannot close stdout. 2) The running out of memory problem was caused by an uninitialized variable. It basically looked like this: int a; malloc(a*sizeof(int)); init(&a); When it should have been: int a; init(&a); malloc(a*sizeof(int)); Not a major problem, but now its fixed.
I see the only chage in the pamtojpeg2k between netpbm-10.26 and netpbm-10.26.4 is the changed declaration of compressionRatio: double compressionRatio -> float compressionRatio Could you please send here a patch if it's not fixed upstream already?