Jaromil@fed.dyne.org to retrocomputing@lemmy.sdf.org · 1 year agoHas anyone C code to filter frames to 1bit color depth approximation?fed.dyne.orgimagemessage-square11fedilinkarrow-up115arrow-down11
arrow-up114arrow-down1imageHas anyone C code to filter frames to 1bit color depth approximation?fed.dyne.orgJaromil@fed.dyne.org to retrocomputing@lemmy.sdf.org · 1 year agomessage-square11fedilink
minus-squarevrighter@discuss.tchncs.delinkfedilinkarrow-up3·1 year agoyou 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.
minus-squareJaromil@fed.dyne.orgOPlinkfedilinkarrow-up0arrow-down1·1 year agoI’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…
minus-squarevrighter@discuss.tchncs.delinkfedilinkarrow-up1·1 year agoI told you what to look for. It’s a simple algorithm. Maybe try looking at the “implementation” section on the wikipedia page…
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.
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…
I told you what to look for. It’s a simple algorithm. Maybe try looking at the “implementation” section on the wikipedia page…