• vrighter@discuss.tchncs.de
    link
    fedilink
    arrow-up
    18
    ·
    1 year 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
      ·
      1 year 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
        ·
        1 year ago

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

      • Kit Sorens@lemmy.dbzer0.com
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year 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
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    1 year ago

    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?

    • JaromilOPA
      link
      fedilink
      arrow-up
      3
      ·
      1 year ago

      yes I’m looking for C algorithms for that. I just searched for “1bit old-school image”

      • GrappleHat@lemmy.ml
        link
        fedilink
        English
        arrow-up
        2
        ·
        1 year 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.

    • otp@sh.itjust.works
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      It took me some time, but I realized they’re asking “Does anyone have”. I think.

      They tried to use verb raising, which is where the verb is moved to the start of a sentence to ask a question. We usually only do it for “to be” (e.g., “is”), but we very rarely do it with “to have”, so maybe that’s where that came from.

      (Think “John is good” becoming “Is John good?”, instead of needing a question word or “do” at the start of the sentence)