Bug 149924 - pamtojpeg2k and others just don't work
pamtojpeg2k and others just don't work
Product: Fedora
Classification: Fedora
Component: netpbm (Show other bugs)
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Jindrich Novy
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2005-02-28 15:42 EST by Michael Sander
Modified: 2013-07-02 19:06 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-03-11 01:58:21 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Michael Sander 2005-02-28 15:42:44 EST
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@giraffe-data.com > 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):

How reproducible:

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:
Comment 1 Michael Sander 2005-02-28 15:46:46 EST
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
Comment 2 Jindrich Novy 2005-03-11 01:58:21 EST
I did another prerelease of netpbm-10.26.4, what is just built to solve this issue.

Comment 3 Michael Sander 2005-03-11 19:01:02 EST
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;
When it should have been:
   int a;
Not a major problem, but now its fixed.
Comment 4 Jindrich Novy 2005-03-14 03:19:05 EST
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?

Note You need to log in before you can comment on or make changes to this bug.