I have made several edits to the code to make it more standard compliant. Consider introducing unit tests to fix crashing bugs. [main.c.zip](https://github.com/roecrew/pixt/files/2232827/main.c.zip)