Hi, I wrote SQL Image Viewer, and it will do what you need, which is to display any images (gif, jpg, png, bmp, tif, ico, psd etc) retrieved by your query. It identifies the image type from the image data itself. In addition, it'll also identify most types of binary data that may be returned by your query e.g. pdf, xls, doc, zip, bz2, gz, wav, mp3, etc. It can also export your image and binary data to disk.
Give the trial version a run and if you have any further questions, just ask.
Thanks.