[JAVA2D] Dithering

2006-05-11 Thread Erik Vanherck
Hi, In a certain piece of code we were using Jai to dither a rendering of our chart objects, however this caused some performance issues and we noticed the RenderingHints.KEY_DITHERING so we tried moving the dithering into the rendering of the chart that was already using the graphics2D of a

Re: [JAVA2D] Dithering

2006-05-11 Thread Dmitri Trembovetski
Hi Eric, final BufferedImage buf = new BufferedImage(Math.round(fWidth*scale), Math.round(fHeight*scale), BufferedImage.TYPE_BYTE_BINARY, new Well, here's you problem. You're creating a binary image, with only two possible colors. So the dithering can't be smooth by definition - each

Re: [JAVA2D] Dithering

2006-05-11 Thread Jim Graham
Hi Erik, There are likely 2 different issues that you are dealing with here. First is the issue of dithering during drawing vs. during imaging. We currently do dithering when rendering an image into a lower color resolution destination, but we don't do any dithering at all when we do draw and

Re: [JAVA2D] Dithering to black-and-white (monochrome) image

2001-12-05 Thread Dmitri Trembovetski
Hi Samo, On Thu, Nov 29, 2001 at 11:03:0p +0100, Samo Pitamic wrote: Hi all! I have the following problem: I have a Buffered image, then I want to transcode it into as small as possible format for wireless transfer. The most suitable format is PNG and since the wireless devices

[JAVA2D] Dithering to black-and-white (monochrome) image

2001-11-29 Thread Samo Pitamic
Hi all! I have the following problem: I have a Buffered image, then I want to transcode it into as small as possible format for wireless transfer. The most suitable format is PNG and since the wireless devices usually only support monochrome images, I want to encode the image in this mode.

Re: [JAVA2D] Dithering to black-and-white (monochrome) image

2001-11-29 Thread Brian Burkhalter
Samo, While this does not directly reply to your question please note that 8-to-1 bit dithering is possible using Java Advanced Imaging. Sample code for dithering using the ErrorDiffusion and OrderedDither operations is provided at