From: "Ara.T.Howard" Date: 2004-05-20T12:38:48+09:00 Subject: Re: RMagick jp2 problem On Thu, 20 May 2004, Tim Hunter wrote: > On Wed, 19 May 2004 07:19:29 -0600, Ara.T.Howard wrote: > > > On Wed, 19 May 2004, Tim Hunter wrote: > > > >> On Tue, 18 May 2004 21:04:26 -0600, Ara.T.Howard wrote: > >> > >> > yes. this worries me - it's as if the ImageMagick binding to the > >> > jasper lib is incorrectly dealing with compression/quality... as i > >> > said before, the jasper binary handled perfectly and i get ZERO > >> > differences when comparing the bands of a tiff image and one converted > >> > via tifftopnm/jasper... > > Ara, I received your email at my home address but my reply to your .gov > address bounced(?). Anyway, the ImageMagick developers say that > > convert -quality 100 image.tif image.jp2 yes - i've done this but can subseqently show a diff of the bands using envi (rsi inc.) or imgcmp (which ships with jasper) - it's bizarre: for the most part the diff shows all zeros (no difference) but then 20 or 20 pixels will be different... at this point this discussion is well off topic but i do have ONE more RMagick specific question to ask: what is the most __effecient__ (we are dealing with HUGE images) to compare the raw pixel values of two images using RMagick, eg (not efficient psuedo code). tiff_pixels = Image.get_pixels jp2_pixels = Image.get_pixels i = 0 tiff_pixels.each do |pixel| raise "diff @ #{ i } " unless pixel = jp2_pixels[i] i += 0 end thanks again. -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 ===============================================================================