From 3be5c1713b28d8cf59ab3008f86d484d8a2d9666 Mon Sep 17 00:00:00 2001 From: Harald Kuhr Date: Thu, 31 Oct 2013 09:49:58 +0100 Subject: [PATCH] Updated readme. --- README.md | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e3794f8d..d338c222 100644 --- a/README.md +++ b/README.md @@ -157,7 +157,8 @@ from Oracle. ### Using the ResampleOp -The library comes with a +The library comes with a resampling (image resizing) operation, that contains many different algorithms +to provide excellent results at reasonable speed. import com.twelvemonkeys.image.ResampleOp; @@ -166,9 +167,23 @@ The library comes with a BufferedImage input = ...; // Image to resample int width, height = ...; // new width/height - BufferedImageOp resampler = new ResampleOp(width, height, ResampleOp.FILTER_LANCZOS); + BufferedImageOp resampler = new ResampleOp(width, height, ResampleOp.FILTER_LANCZOS); // A good default filter, see class documentation for more info BufferedImage output = resampler.filter(input, null); +### Using the DiffusionDither + +The library comes with a dithering operation, that can be used to convert `BufferedImage`s to `IndexColorModel` using +Floyd-Steinberg error-diffusion dither. + + import com.twelvemonkeys.image.DiffusionDither; + + ... + + BufferedImage input = ...; // Image to dither + + BufferedImageOp ditherer = new DiffusionDither(); + BufferedImage output = ditherer.filter(input, null); + ## Building