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

*** Please report new bugs here! ***

Moderators: helmut, XnTriq, xnview, Dreamer

Post Reply
pcopissa
Posts: 1
Joined: Tue Apr 29, 2014 8:29 pm

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

Post 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.
cday
XnThusiast
Posts: 4396
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

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

Post 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 694 times
Expected size for CCITT G4 compression = 67KB.

Test image:
Attachments
Test image TIFF_LZW.tif
(130.79 KiB) Downloaded 49 times
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

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

Post by xnview »

See Issue 349 for current status and details.
Pierre.
Post Reply