this post was submitted on 23 Nov 2023
30 points (96.9% liked)

retrocomputing

4768 readers
161 users here now

Discussions on vintage and retrocomputing

founded 2 years ago
MODERATORS
 
top 11 comments
sorted by: hot top controversial new old
[–] vrighter@discuss.tchncs.de 15 points 2 years ago (1 children)

you want to convert the image to grayscale properly (using luminance, not the mean of the rgb colors), then you can palettize it using a dithering algorithm like floyd-steinberg, with a palette containing only the colors black and white.

[–] jaromil@fed.dyne.org 0 points 2 years ago (1 children)

I'm looking for a source code in C that does that, to include it in frei0r, before I have to go and write it myself...

[–] vrighter@discuss.tchncs.de 1 points 2 years ago

I told you what to look for. It's a simple algorithm. Maybe try looking at the "implementation" section on the wikipedia page...

[–] Synthead@lemmy.world 6 points 2 years ago

Check out ImageMagick.

[–] cyberic@discuss.tchncs.de 5 points 2 years ago (1 children)

I would check out some tools written for the PlayDate game console (which is 1-bit)

https://devforum.play.date/t/playdither-a-web-tool-for-1-bit-image-dithering/5339

[–] jaromil@fed.dyne.org 2 points 2 years ago (1 children)

this is awesome!!!! thanks!!! <3

[–] GlitchyDigiBun@lemmy.dbzer0.com 1 points 2 years ago

Looks like the arduboy's display. Might look for some C++ arduino libraries. Additionally, it never hurts to have gimp/PS skills for stuff like this, and there are likely plugins for both.

[–] GrappleHat@lemmy.ml 2 points 2 years ago* (last edited 2 years ago) (1 children)

I don't understand the question. Are you looking for a tool which converts images to 1-bit? With dithering to simulate greys?

This art is super cool, btw! Where can I find more?

[–] jaromil@fed.dyne.org 2 points 2 years ago (2 children)

yes I'm looking for C algorithms for that. I just searched for "1bit old-school image"

[–] mrkite@programming.dev 3 points 2 years ago

Search for Floyd Steinberg dithering. That's the algorithm used by a lot of classic Mac software.

[–] GrappleHat@lemmy.ml 2 points 2 years ago

This web utility seems like exactly what you're describing. I think this was a small app someone made for themselves while developing a game for Playdate. The source might be available on their Github. If not they seem friendly, you could ask for it.