'**SUMMARY**
This function automatically pops up a window and shows the current image.
**PARAMETERS**
* *type* - this string can have one of two values, either \'window\', or \'browser\'. Window opens
a display window, while browser opens the default web browser to show an image.
**RETURNS**
This method returns the display object. In the case of the window this is a JpegStreamer
object. In the case of a window a display object is returned.
**EXAMPLE**
>>> img = Image("lenna")
>>> img.show()
>>> img.show(\'browser\')
**SEE ALSO**
:py:class:`JpegStreamer`
:py:class:`Display`'

def show(self, type='window'):

    if (type == 'browser'):
        import webbrowser
        js = JpegStreamer(8080)
        self.save(js)
        webbrowser.open('http://localhost:8080', 2)
        return js
    elif (type == 'window'):
        from SimpleCV.Display import Display
        if init_options_handler.on_notebook:
            d = Display(displaytype='notebook')
        else:
            d = Display(self.size())
        self.save(d)
        return d
    else:
        print 'Unknown    type    to    show'
