changed code to output windowed search image.