I need to create images in PNG format - is there a recommended Erlang module to do that with? Create image, set individual pixels, save to disk.
ChatGPT recommends largerpng - but that seems to be a hallucination…
Add lagerpng as a dependency in your Erlang project. You can include it in your rebar.config or mix.exs file, depending on whether you’re using Rebar3 or Mix as your build tool. Here’s an example for Rebar3:
Thanks - there is another “built-in” package that I also tried to use - until I realised it was no longer part of OTP. I ended up writing my own version - wouldn’t want to do that for every image format out there, but turns out PNG is relatively simple - and Erlang with its binary support not a bad implementation language.