A
Ara.T.Howard
the following program:
~ > cat tiff2jp2
require 'RMagick'
tiff = ARGV.shift
jp2 = ARGV.shift || tiff.gsub(%r/tiff?/o,'jp2')
img = Magick::Image.read(tiff).first
img.write jp2
results in quite a 'lossy' transformation even though the docs caim a default
compression type of lossless jp2. i've played with both quality and
compression settings and always lose data with this method
however, using this command:
tifftopnm image.tiff | jasper --input-format pnm --output-format jp2 > image.jp2
does NOT lose data so this shows that that jasper jp2 lib IS capable of doing
lossless compresion
any ideas on why this is?
-a
--
===============================================================================
| EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov
| PHONE :: 303.497.6469
| ADDRESS :: E/GC2 325 Broadway, Boulder, CO 80305-3328
| URL :: http://www.ngdc.noaa.gov/stp/
| "640K ought to be enough for anybody." - Bill Gates, 1981
===============================================================================
~ > cat tiff2jp2
require 'RMagick'
tiff = ARGV.shift
jp2 = ARGV.shift || tiff.gsub(%r/tiff?/o,'jp2')
img = Magick::Image.read(tiff).first
img.write jp2
results in quite a 'lossy' transformation even though the docs caim a default
compression type of lossless jp2. i've played with both quality and
compression settings and always lose data with this method
however, using this command:
tifftopnm image.tiff | jasper --input-format pnm --output-format jp2 > image.jp2
does NOT lose data so this shows that that jasper jp2 lib IS capable of doing
lossless compresion
any ideas on why this is?
-a
--
===============================================================================
| EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov
| PHONE :: 303.497.6469
| ADDRESS :: E/GC2 325 Broadway, Boulder, CO 80305-3328
| URL :: http://www.ngdc.noaa.gov/stp/
| "640K ought to be enough for anybody." - Bill Gates, 1981
===============================================================================