I'm no expert, but I often invoke eog from the command line. I'm running gnome as my window manager and eog stands for, "Eye of Gnome," a picture viewer. I'll cd into a directory with pictures and issue the command:
Code:
eog somepicture.jpg
Maybe a script expert could help you write eog into your program.