The other way is to subscribe to the image topic from your application. This will require your application to compile against gazebo though. Find the topic using gztopic list in command line. This example shows how to subscribe to a topic, and here (line 120 and line 145) shows you how to get the image data from the msg.