e0qdk,
@e0qdk@kbin.social avatar

I was just thinking about the image resizing thing again when I saw your message notice pop up. Another option for preview is a web browser. A minimal HTML page with some JS to refresh the image would avoid the image resize on reload problem, and gives you some other interesting capabilities. Python ships with a kind of meh (slow and quirky), but probably sufficient HTTP server (python3 -m http.server) if you'd prefer to load the preview on a different computer on your LAN entirely (e.g. cellphone / tablet / ... ) for example.

A simple HTML file for this would be something like:


<html>
  <head>
    <style>
      html, body {
        background-color: #000000;
      }
    </style>
    <script>
      function reload()
      {
          let img = document.getElementById("preview");
          let url = new URL(img.src);
          url.searchParams.set("t", Date.now());    // cache breaker; force reload
          img.src = url.href;
      }
      
      function start()
      {
          setInterval(reload, 500);
      }
    </script>
  </head>
  <body onload="start()">
    <img id="preview" src="output.png">
  </body>
</html>

Regarding input from a gamepad -- I've had some similar ideas before but haven't really had much success using a gamepad artistically outside some limited things where I either wrote the entire program or was able to feed data into programs that accepted input over the network (e.g. via HTTP and which I wrote a custom adapter for). It's been a long time since I've tried anything in that space though, and it might be possible to do something interesting by trying to make the system see the combination of a gamepad stick as relative mouse motion and trigger as pen pressure. I'm not quite sure how to go about doing that, but I'll let you know if I find a way to do it.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • Hentai
  • AskKbin@kbin.social
  • doujinshi
  • announcements
  • general
  • All magazines