PNG to B/W-TIF: Dither or nothing?

Ask for help and post your question on how to use XnView Classic.

Moderators: helmut, XnTriq, xnview

Post Reply
User avatar
Peter2
XnThusiast
Posts: 1365
Joined: Thu Nov 24, 2005 3:07 pm
Location: CH

PNG to B/W-TIF: Dither or nothing?

Post by Peter2 »

I don't know - a bug or my fault:

I take a PNG and convert it with Batch-Prozessing to TIF (1 bit, B/W, LZW).
http://img412.imageshack.us/img412/8199/gedrehtlt0.png

When I use the setting "Dither", I get a dithered TIF, which I don't want.
http://img254.imageshack.us/img254/6113 ... herza9.png

When I use "no dither", I get an empty image.
http://img412.imageshack.us/img412/6572 ... hercs9.png

???

Peter
Last edited by Peter2 on Wed Oct 01, 2008 5:13 am, edited 3 times in total.
XnViewMP <Current version> German, XnConvert <Current version>, Win 10
User avatar
rra
Posts: 192
Joined: Thu May 11, 2006 1:46 pm
Location: The Netherlands

Post by rra »

Can't confirm this on xnview 194.2 :

dithering gives me the dithered B/W TIFF image,
selecting "no dither" gives me the non-dithered, yet halftoned pure black-white TIFF image, as should be !


René
User avatar
Drahken
Posts: 884
Joined: Sun Apr 10, 2005 4:29 pm

Post by Drahken »

It seems to be an issue with the formula for setting it to binary. It turns solid white regardless whether you use the export function to export it to b/w tiff, png, gif, bmp, etc, or if you set it to b/w (without dither) directly in xnview. The problem is with the pale shade of the lines. If you set the lines to a darker color (this can be done by setting it to 16 colors & then editting the colormap to change the pale blue to a darker color, or by setting it to greyscale & then cranking the contrast up & darkness down) & THEN convert to binary, it'll come out as you would expect it to.

Also, if you just crank the contrast up on the original pic, it will turn white when you reach 86%.
User avatar
rra
Posts: 192
Joined: Thu May 11, 2006 1:46 pm
Location: The Netherlands

Post by rra »

I would suspect that XNview does this (or should do this) already:
convert the image to grayscale, stretch the whole greyscale-image
between 0 and 255, and apply a threshold of value 128,
and making every pixel above 128 white (1)
and 128 and below equal to black (0) ??


René
Post Reply