• vrighter@discuss.tchncs.de
    link
    fedilink
    arrow-up
    18
    ·
    7 months ago

    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.

    • JaromilOPA
      link
      fedilink
      arrow-up
      1
      arrow-down
      1
      ·
      7 months ago

      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
        link
        fedilink
        arrow-up
        1
        ·
        7 months ago

        I told you what to look for. It’s a simple algorithm. Maybe try looking at the “implementation” section on the wikipedia page…