We currently only worry about dithering on 8-bit
indexed destinations.
We have a request outstanding for dithering on
15/16-bit displays, but
we haven't gotten to it. This would be the first
request for dithering
on a TrueColor display. ;-)
Presumably if you get it working for 15/16-bit then
We currently only worry about dithering on 8-bit
indexed destinations.
We have a request outstanding for dithering on
15/16-bit displays, but
we haven't gotten to it. This would be the first
request for dithering
on a TrueColor display. ;-)
Presumably if you get it working for 15/16-bit
I am not very good with Java2D, but the color problem described is mostly due to incorrect LCD representation of sRGB color space on the device. Nevertheless, manual visual smoothing of this could probably also be done by changing the individual colors independently on each row. If there is a
Jim,
Thanks for looking into this, and thanks to swpalmer for creating the
test case.
I realize why the bars appear, and sadly, they appear on the LCDs
I've tested as well. Rather than try and get you guys to introduce
new features into your rendering engine (dithering in a 24-bit
environment,
Here's a guess - you basically want the LSbit of the raster to have a
regular pattern to it rather than be banded. If you don't want to
reinvent the GradientPaint wheel, then you could write a delegating
Paint implementation that used GradientPaint to generate an initial
Raster and then filter
When I run this case I can just make out 29 extremely faint bars on the
screen which is exactly how many possible colors there are between the
endpoints you chose so it looks like I am seeing adjacent colors on a
true-color display. I'm a bit surprised that my eyes are that sensitive
and that my
Hi Ben,
What is the ColorModel in the destination you are rendering to?
What kind of device are you displaying on?
Can you send a test case that demonstrates it?
...jim
Ben Galbraith wrote:
Hi all,
I'm seeking to create a smooth gradient background for a JComponent
I was bored, so here's a test case... I can see the banding, just barely. I
suppose some monitors will make it look worse than others. In any case I think
the solution is dithering, but you will have to do it manually, simply
supplying the rendering hint