convert tif to jp2 results in un-parseable file
Posted: 2012-10-10T16:15:39-07:00
I am trying to use the ImageMagick JPEG-2000 Image Format options to convert a tif to a jp2.
I used this page (http://www.imagemagick.org/script/jp2.php) to formulate a command similar to their example for lossless encoding - so:
$ convert input.tif -define numrlvls=6 -define jp2:tilewidth=1024 -define jp2:tileheight=1024 -define jp2:rate=1.0 -define jp2:lazy -define jp2:prg=rlcp -define jp2:ilyrrates='0.015625,0.01858,0.0221,0.025,0.03125,0.03716,0.04419,0.05,0.0625, 0.075,0.088,0.1,0.125,0.15,0.18,0.21,0.25,0.3,0.35,0.4,0.5,0.6,0.7,0.84' -define jp2:mode=int output.jp2
However, the resulting file has some issue because I can't open it with Photoshop - getting error "File format module cannot parse the file"
I also tried to just convert input.tif output.jp2 and a couple of other commands and they all resulted in files that give me the same Photoshop error.
I even tried converting the file to bmp before converting it to jp2 and got the same error.
Here are the details about my environment.
Version: ImageMagick 6.6.1-10 %F Q16
Platform: Unix
API: Shell
Does anyone have any suggestions for making valid jp2 files in ImageMagick from tifs? For a couple of years we were using Awares j2kdriver command to make the files, but we started having problems with some files producing segmentation errors (and sometimes dumping core!) and we couldn't figure out why so we're trying to just use ImageMagick commands to simplify things.
Thanks for any recommendations you have!
~Teresa
I used this page (http://www.imagemagick.org/script/jp2.php) to formulate a command similar to their example for lossless encoding - so:
$ convert input.tif -define numrlvls=6 -define jp2:tilewidth=1024 -define jp2:tileheight=1024 -define jp2:rate=1.0 -define jp2:lazy -define jp2:prg=rlcp -define jp2:ilyrrates='0.015625,0.01858,0.0221,0.025,0.03125,0.03716,0.04419,0.05,0.0625, 0.075,0.088,0.1,0.125,0.15,0.18,0.21,0.25,0.3,0.35,0.4,0.5,0.6,0.7,0.84' -define jp2:mode=int output.jp2
However, the resulting file has some issue because I can't open it with Photoshop - getting error "File format module cannot parse the file"
I also tried to just convert input.tif output.jp2 and a couple of other commands and they all resulted in files that give me the same Photoshop error.
I even tried converting the file to bmp before converting it to jp2 and got the same error.
Here are the details about my environment.
Version: ImageMagick 6.6.1-10 %F Q16
Platform: Unix
API: Shell
Does anyone have any suggestions for making valid jp2 files in ImageMagick from tifs? For a couple of years we were using Awares j2kdriver command to make the files, but we started having problems with some files producing segmentation errors (and sometimes dumping core!) and we couldn't figure out why so we're trying to just use ImageMagick commands to simplify things.
Thanks for any recommendations you have!
~Teresa