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

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
JamesHeinrich

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

Post 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.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

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

Post 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.
snibgo's IM pages: im.snibgo.com
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

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

Post 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.
JamesHeinrich

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

Post 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)
JamesHeinrich

Post 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.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

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

Post 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.
snibgo's IM pages: im.snibgo.com
Post Reply