From 4ee0e1dcfc013a10729bc0512c0bee14ad480967 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Sun, 26 Apr 2009 20:18:12 +0000 Subject: "miscellaneous update" git-svn-id: http://svn.code.sf.net/p/netpbm/code/userguide@900 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- pnmremap.html | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) (limited to 'pnmremap.html') diff --git a/pnmremap.html b/pnmremap.html index 6641929f..d95f9c5c 100644 --- a/pnmremap.html +++ b/pnmremap.html @@ -2,7 +2,7 @@ Pnmremap User Manual

pnmremap

-Updated: 19 February 2009 +Updated: 26 April 2009
Table Of Contents @@ -185,16 +185,22 @@ This names the file that contains the palette image.
-fs
-nofloyd
-nofs +
-These options determine whether Floyd-Steinberg dithering is done. -Without Floyd-Steinberg, the selection of output color of a pixel is based -on the color of only the corresponding input pixel. With Floyd-Steinberg, -multiple input pixels are considered so that the average color of an area -tends to stay more the same than without Floyd-Steinberg. For example, -if you map an image with a black, gray, gray, and white pixel -adjacent, to a palette that contains only black and white, it might -result in an output of black, black, white, white. Pixel-by-pixel -mapping would instead map both the gray pixels to the same color. +These options determine whether pnmremap does Floyd-Steinberg +dithering. Without Floyd-Steinberg, pnmremap selects the output color +of a pixel based on the color of only the corresponding input pixel. With +Floyd-Steinberg, pnmremap considers regions of pixels such that the +average color of a region is the same in the output as in the input. The +dithering effect appears as a dot pattern up close, but from a distance, the +dots blend so that you see more colors than are present in the color map. + +

As an example, if your color map contains only black and white, and +the input image has 4 adjacent pixels of gray, pnmremap with +Floyd-Steinberg would generate output pixels black, white, black, white, +which from a distance looks gray. But without Floyd-Steinberg, +pnmremap would generate 4 white pixels, white being the single-pixel +approximation of gray.

Floyd-Steinberg gives vastly better results on images where unmodified quantization has banding or other artifacts, especially @@ -206,6 +212,12 @@ synonym for -nofloyd.

The default is -nofloyd. +

Before Netpbm 10.46 (March 2009), dithering doesn't work quite as you +expect if the color map has a lower maxval than the input. pnmremap +reduces the color resolution to the color map's maxval before doing any +dithering, so the dithering does not have the effect of making the image, +at a distance, appear to have the original maxval. In current Netpbm, it +does.

-norandom -- cgit 1.4.1