I don't believe any pixel for pixel fidelity is expected from JPEG. It should be an approximation, such that minimizes the norm of difference depending on quality. The tolerance should be estimated on a kernel of at least 3x3 or 5x5, not pixel-by-pixel. And should be probably done in a space other than RGB, eg HSV.
Also a color profile may be applied by the system. It has more to do with perceptional aesthetics. > From: "Sherlock, Ric" <[email protected]> > > Following up on an earlier thread back in March: > http://www.jsoftware.com/pipermail/programming/2009-March/014134.html > > If I run the following code on Windows XP or Ubuntu 9.04, I get no > differences > between the results for readimg & read_image for jpg or png files. > If I run it on Windows 7, the png results are identical but reading a Jpeg > image > gives slightly different results. The images both look fine but the > difference > between the two isn't black. > > Is this just a result of a different interpretations of the lossy jpeg > compression algorithm in Windows 7? > Is this to be expected and "acceptable"? > > load 'media/image3 media/platimg viewmat' > fnpng=: jpath '~addons/image3/hy_fly_di.png' > fnjpg=: jpath '~addons/image3/atkiln.jpg' > png1=: read_image fnpng NB. read image using image3 > png2=: readimg fnpng NB. read same image using platimg > png2 -: rgbmat_pplatimg_ png1 > 1 > > jpg1=: read_image fnjpg NB. read image using image3 > jpg2=: readimg fnjpg NB. read same image using platimg > jpg2 -: rgbmat_pplatimg_ jpg1 > 0 > viewrgb jpg2 > viewrgb rgbmat_pplatimg_ jpg1 > viewrgb jpg2 - rgbmat_pplatimg_ jpg1 > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
