They may not want to imply that didder's linearized rabbit is wrong, but I'm comfortable saying so. It's not just a little dark, it's way dark, to the point of hiding detail. The linearized RGB palette is similarly awful. It clobbers a whole swath of colors, rendering them as nearly black. Purples are particularly brutalized. Yellows disappeared and became white. On my phone, the middle palette doesn't appear too bri…
Thanks for your comment! I'm glad you're seeing the same thing :) I re-implemented the linearised dithering in python and got similar results. I checked and rechecked the colour profiles in GIMP, nothing... At this point I can only hope for an expert to appear and tell me what exactly I am doing wrong.
Dithering in Colour
51–60 of 68 posts
Re: Dithering in Colour
#52Re: Dithering in Colour
#53It looks far too dark, and I’m viewing it on an iPad with a high DPI screen. I also strongly suspect I can’t change the gamma on this device, nor have I ever knowingly done so. Anyone know why it looks bad?
Re: Dithering in Colour
#54https://bisqwit.iki.fi/story/howto/dither/jy/
This page focuses on ordered dithering, which tend to work better for animations compared to error diffusion based dithering schemes (like the linked article).
Re: Dithering in Colour
#55They may not want to imply that didder's linearized rabbit is wrong, but I'm comfortable saying so. It's not just a little dark, it's way dark, to the point of hiding detail. The linearized RGB palette is similarly awful. It clobbers a whole swath of colors, rendering them as nearly black. Purples are particularly brutalized. Yellows disappeared and became white. On my phone, the middle palette doesn't appear too bri…
Thanks for your comment! I'm glad you're seeing the same thing :) I re-implemented the linearised dithering in python and got similar results. I checked and rechecked the colour profiles in GIMP, nothing... At this point I can only hope for an expert to appear and tell me what exactly I am doing wrong.
var img
var pixel
var threshold
var error = [0, 0, 0]
var a0
function preload() {
img = loadImage("https://upload.wikimedia.org/wikipedia/commons/thumb/4/44/Albrecht_D%C3%BCrer_-_Hare%2C_1502_-_Google_Art_Project.jpg/1920px-Albrecht_D%C3%BCrer_-_Hare%2C_1502_-_Google_Art_Project.jpg")
}
function setup() {
// I'm just using a low discrepancy sequence for a quasirandom
// dither and diffusing the error to the right, because it's
// trivial to implement
a0 = 1/sqrt(5)
pixelDensity(2)
createCanvas(400, 400);
image(img, 0, 0, 400, 400)
loadPixels()
pixel = 0
threshold = 0
}
function draw() {
if (pixel > 400*400*16) {
return
}
for (var i = 0; i threshold * 255 ? 255 : 0
error[j] += c - pixels[pixel + j]
}
pixel += 4
}
updatePixels()
}
Of course this isn't trying to pick the closest colour in the palette as you're doing - it's just trying to end up with the same intensity of rgb as the original image. It does make me wonder if you should be using the manhattan distance instead of euclidean, to get the errors to add correctly.Re: Dithering in Colour
#56Re: Dithering in Colour
#57See also FadeCandy by Micah: https://scanlime.org/2013/11/fadecandy-easier-tastier-and-mo... > Firmware that uses unique dithering and color correction algorithms to raise the bar for quality while getting out of the way of your creativity.
Re: Dithering in Colour
#58> If the linearised version looks wrong to you, try opening it on a larger monitor in it’s original size and check your gamma settings. It looks far too dark, and I’m viewing it on an iPad with a high DPI screen. I also strongly suspect I can’t change the gamma on this device, nor have I ever knowingly done so. Anyone know why it looks bad?
Re: Dithering in Colour
#59Earlier quoted context omitted.
I think dithering should still be considered, since a super high detailed game otherwise pretty engine that then has banding in the sky is pretty ugly. 32-bit RGBA can still have visible banding which dithering can fix. 256 brightness levels per channel isn't all that much when it comes to subtle variations in sky colors, the eye is more sensitive than that 12-bit per channel color might be enough to never have visib…
With 100+Hz displays it's not that hard to do temporal dithering as well. Your cones are surprisingly low bandwidth (why old color TVs even worked at 30Hz), while your rods provide danger/flicker cues outside the fovea. Getting an extra 2bits of hue (ab) while maintaining luminance (L) is quite doable except at the chroma and brightness extremes where your eye mostly ignores them anyway. That could be done pretty hig…
Some TVs and monitors do temporal dithering for you... Accept 8-bit input, and temporal dither it for the 6-bit display doesn't look that bad. Probably extends well to 10-bit input.
Re: Dithering in Colour
#60Dithering is something of a lost art now that our displays can handle millions of colors in high definition, but it can be a striking artistic effect. If anyone thinks their websites are too colorful, I made a pure JavaScript web component to dither images on client in real time, taking into account the real pixel size of the current display. https://sheep.horse/2023/1/improved_web_component_for_pixel-...
Very cool, but the image in the bottom of the page flickers when scrolling.