One of my colleague recommended me using Openframework to implement the program to show a full screen image. See more details in this previous blog.
So I first created an application class FullScreenApp, which derives from ofBaseApp:
An ofImage object is then introduced, and the update() and draw() function is overriden:
In the main() function, call the below code:
Here the code to load background image and process command line argument is skipped since it is fairly simple and straightforward.
Build and Run! Happy coding!