Page 1 of 1

0.64: Export (or save) ignores B&W setting

Posted: Tue Apr 29, 2014 9:04 pm
by pcopissa
Using XnView 0.64 on OSX 10.6.8
Use case: I use an image with color depth = 1 bit, which is scanned text with about 4.7 Megapixels. The CCITT G4 algorithm is optimized for such images and indeed achieves lossless compression ratio between 2 and 3 time better than the Zip/Deflate of the PNG. (16 KiB instead of 42 KiB in this particular instance)
Unfortunately, my scanner does not support the CCITT algorithms so I want to convert from PNG/Deflate to TIFF/CCITT G4.
Steps:
1) Open a PNG image with color depth = 1 bit (black and white).
2) Click File>Export...
3) Select mode "Black and white" and "TIFF" format.
4) In the "Compression for Black and White picture" select "CCITT G4". In the "Compression for color picture" select "None".
5) Click refresh : The estimated image size jumps to over 11 Megabytes (!). Click "Export...".
Observed behavior: The file create is not CCITT compressed. Instead, it has no compression, as revealed by inspecting the output file.
It looks like that XnViewMP 0.64 is actually compressing B&W images with the algorithm set for color images. Indeed, the estimated size (and the compression method in the output file...) changes if you change the setting for color pictures in the dialog.
Expected behavior: The B&W images should be compressed with the algorithm specified for B&W images.

In 0.61 this was working as expected : The estimated output size shown at step 5 was about 16 KiB for my test image and the output file was compressed using CCITT G4.

Re: 0.64: Export (or save) ignores B&W setting

Posted: Tue Apr 29, 2014 10:13 pm
by cday
At a quick look it seems as if the colour compression setting selected is being used for black and white images:
Export.png
Export.png (49.08 KiB) Viewed 692 times
Expected size for CCITT G4 compression = 67KB.

Test image:

Re: 0.64: Export (or save) ignores B&W setting

Posted: Tue May 06, 2014 2:14 pm
by xnview
See Issue 349 for current status and details.