This patch sets the stage for displaying frame thumbnails in qapitrace by first capturing a snaphot stream. We first prepare qapitrace to capture a snapshot stream. We enhance replayTrace() to accept a second parameter for specifying thumbnail capture. This then enables us to notify the retracer so set up command line parameters to glretrace, which runs out of process. We specify that glretrace must generate snapshots and then emit them to stdout. After glretrace returns, we extract PNM images from the output stream. We parse PNM the ASCII header to extract number channels, the width and the height of the following binary image data. We then extract the binary data of the image on a per-scanline copy. We create a QImage of the correct size and insert the image data into the QImage. Finally, we scale the size of the image down to the size of a thumbnail. Lastly, we create a QList collection to hold the sequence of thumbnails. This list is return to the main window object of qapitrace and will later be used to display these thumbnails.