Page 1 of 1

error/jp2.c/WriteJP2Image/877 (Win64 6.6.1-0 2010-04-02 Q16)

Posted: 2010-04-05T04:57:39-07:00
by JamesHeinrich
I'm trying to convert some larger TIFF files to JP2, and ImageMagick is failing:

Code: Select all

>convert in.tif out.jp2
convert: unable to create image `out.jp2' @ error/jp2.c/WriteJP2Image/877.
The two TIFFs in question are sized 21494x2408 and 34847x2461 respectively. They both converted to JPEG just fine with a 1-character change in the command line. A smaller test TIFF (1680x1050) converted to JP2 with no errors. I'm using the latest Windows x64 binary ("ImageMagick 6.6.1-0 2010-04-02 Q16") as downloaded here:
http://www.imagemagick.org/download/bin ... static.exe

Here is a link to the smaller of the two test images, if it helps you.

Re: error/jp2.c/WriteJP2Image/877 (Win64 6.6.1-0 2010-04-02

Posted: 2010-04-05T08:31:46-07:00
by snibgo
On Windows 7, IM 6.6.0-8, on a 4GB laptop:

convert IMG_7490-7589v2.tif x.jpg

works fine, and is fast. I suppose IM doesn't need to unpack/repack.

convert IMG_7490-7589v2.tif x.jp2

takes 30 seconds, consumes memory, then falls over.

Re: error/jp2.c/WriteJP2Image/877 (Win64 6.6.1-0 2010-04-02

Posted: 2010-04-05T08:39:30-07:00
by magick
Add -limit area 80mb to your command line to force the image pixels to disk. Let us know if that fixes the problem.

Re: error/jp2.c/WriteJP2Image/877 (Win64 6.6.1-0 2010-04-02

Posted: 2010-04-05T08:43:45-07:00
by JamesHeinrich
I guess I should've mentioned: I'm running on Win7 x64, Core i7, 6GB RAM.

It takes about 3 seconds for the successful conversion to JPG (using ~500MB RAM at peak)
It takes about 1 seconds for the failed conversion to JPG (using ~200MB RAM at peak)

Posted: 2010-04-05T08:54:12-07:00
by JamesHeinrich
Interesting. Looks like it was my fault, somehow. I think Windows was getting confused with paths (between IM's convert and c:\windows\system32\convert.exe maybe? :?)

I tried the test running from C:\Program Files\ImageMagick-6.6.1-Q16 and it worked fine (chewed on about 2GB of RAM for 5-10 seconds and worked fine). Not much difference with or without the "-limit area 80mb" option, in this case at least; without that it took about 10-20% more RAM, but binary-identical output, and similar processing time.

Thanks for the help, sorry for the false alarm.

Re: error/jp2.c/WriteJP2Image/877 (Win64 6.6.1-0 2010-04-02

Posted: 2010-04-05T08:56:22-07:00
by snibgo
For me, on Windows 7:

Code: Select all

convert -limit area 80mb IMG_TIF.tif img.jp2
completes, and the result looks fine.