- From: Eric Portis <lists@ericportis.com>
- Date: Wed, 15 Jan 2014 01:11:00 -0700
- To: Frédéric Kayser <f.kayser@free.fr>
- Cc: public-respimg@w3.org
- Message-ID: <61CA2FBE3CA240F6BAA8A370E32589F4@ericportis.com>
On Tuesday, January 14, 2014 at 5:27 PM, Frédéric Kayser wrote: > Hi, > Setting quality to 50 in Photoshop activated 4:2:0 chroma sub-sampling, but you didn't use sub-sampling for the JPEG2000 file (-s 2,2). I didn’t know that! I used a 50 quality setting in “Save for Web…” mostly because it seemed like a nice, neutral number… I had no idea that it was the border between such a big change in encoding methods. As for the specific OpenJPEG option that you mention (-s)… I tried it, and it seems to do nothing when you specify the output quality in dB (with -q). When using -q, the indexes for the chroma-subsampled and not-chroma-subsampled jp2s are identical, and ImageMagick’s compare tool thinks that the images themselves are identical, too. When I try `-s 2,2` with a compression-ratio (`-r 80`) instead of a PSNR quality (`-q 40.9633`), the indexes *do* turn out differently… but not by much… only by a couple of hundred bytes, and the change seems to only affect the highest-res couple of layers. I used the following commands ``` $ image_to_j2k -i USA_Pro_Challenge/uncompressed/full.tif -x ratio_subsampled.idx -o ratio_subsampled.jp2 -p RLCP -n 6 -I -s 2,2 -r 80 [INFO] tile number 1 / 1 [INFO] - tile encoded in 4.070737 s Generated outfile ratio_subsampled.jp2 Generated index file ratio_subsampled.idx $ image_to_j2k -i USA_Pro_Challenge/uncompressed/full.tif -x ratio.idx -o ratio.jp2 -p RLCP -n 6 -I -r 80 [INFO] tile number 1 / 1 [INFO] - tile encoded in 4.118631 s Generated outfile ratio.jp2 Generated index file ratio.idx [e@Rusty ~/Desktop/jpeg2000 tests/2014-01-12/_reorganized]$ ``` to generate these files: http://ericportis.com/etc/subsampled_chroma/ (specifically, compare this index: http://ericportis.com/etc/subsampled_chroma/ratio.idx to this one: http://ericportis.com/etc/subsampled_chroma/ratio_subsampled.idx) Any idea why: 1) chroma subsampling is disabled or ineffective on images whose quality, rather than compression ratio, is specified? 2) subsampling the chroma only affects the bytesizes of the highest-res couple of layers? My guess is that the lower resolution approximations contained within the .jp2 are kind of like lossless decompositions of the lossy full-res file -- the subsampling is only happening at full-res, and therefore won’t help the poor efficiency of partial, low-res loads. Thanks! —eric
Received on Wednesday, 15 January 2014 08:11:32 UTC