I have a command line utility which is able to receive an image via stdin and convert it to a different format and output it to stdout.
I use this from a program, but every time I run it, a subprocess needs to be invoked which is very slow.
So I wonder is there a way, ideally using systemd, to turn this command line program into a "server" that remains in memory and somehow is able to receive image data and output it?
systemd, then yes. There are plenty of examples on Google that you can use as a template.ideally using systemd. If you want to use it withsystemd, then you need to create a daemon for it. You can also add more information on how it functions and what it's supposed to do to even determine ifsystemdis viable for it.