-- Leo's gemini proxy
-- Connecting to taoetc.org:1965...
-- Connected
-- Sending request
-- Meta line: 20 text/gemini
mntn.xyz talks about dithering:
> It seems that dithering is undergoing a renaissance on Gemini. Not only does it introduce a pleasant retro aesthetic, but for images with smaller dimensions, dithering with a reduced palette can both save bandwidth and make content more accessible to old devices.
I decided to give it a try, with a couple twists.
I'm using Python to dither the images:
from PIL import Image input_ = Image.open('image.jpg') output = input_.quantize( colors=8, dither=Image.FLOYDSTEINBERG, kmeans=1, )
On my blog I'm blending the dithered images using CSS, depending on the choice of a light or dark theme:
@media (prefers-color-scheme: dark) { img { mix-blend-mode: screen; } } @media (prefers-color-scheme: light) { img { mix-blend-mode: multiply; } }
Published on 2021-10-11 02:04:22+00:00 by Beto Dealmeida <roberto@dealmeida.net>.
-- Response ended
-- Page fetched on Mon May 6 07:45:25 2024