Erlang NIF to read image data from PNG and JPEG files.
This code is fully derived from the Elixir https://github.com/arjan/pixels library via a literal conversion of the Elixir parts to Erlang.
The original Elixir Pixels library should also be fully usable from Erlang.
This version exists solely because I couldn't bring myself to add an Elixir dependency to erlguten. Thank you Joe, RIP
For PNG images, it uses the lodepng C library.
For JPEG images, it uses the ujpeg C library. Progressive or lossless JPEG files are not supported by this library.
Add to your rebar.config
$ rebar3 compile
Thank you Arjan for making the original