Repository: napari/napari

Issue:
Viewer screenshot is broken
## 🐛 Bug

`viewer.screenshot()` gives the following error, that I think comes from us using features on `vispy` master that aren't present on their last release. We might need to backport or change our code.

```python
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-11-1db5616997f4> in <module>()
----> 1 viewer.screenshot()

~/Github/napari/napari/components/_viewer/model.py in screenshot(self, region, size, bgcolor, crop)
    156         """
    157         return self._canvas.render(region=None, size=None, bgcolor=None,
--> 158                                    crop=None)
    159 
    160     def add_layer(self, layer):

TypeError: render() got an unexpected keyword argument 'crop'
```

## To Reproduce

Steps to reproduce the behavior:

1. Launch a viewer and add some images 
2. Run `viewer.screenshot()`


<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->

## Expected behavior

<!-- A clear and concise description of what you expected to happen. -->

## Environment

 - napari Version (e.g., 1.0):
 - OS (e.g., Linux):
 - Python version:
 - Any other relevant information:

## Additional context

<!-- Add any other context about the problem here. -->



Discussion:
Looks like this was introduced in #88. Is having a `crop` parameter really that useful? Implementing it would require us to also backport `FrameBuffer`, a core `gloo` object, which may have unforeseen consequences.

Also, the parameters weren't properly passed to the function so that should be properly addressed too.
I think we can drop crop for now and just get something that works - do you want to work on a PR for a fix @kne42? 
Yeah, sounds good

Resolving patch:
diff --git a/napari/components/_viewer/model.py b/napari/components/_viewer/model.py
--- a/napari/components/_viewer/model.py
+++ b/napari/components/_viewer/model.py
@@ -128,7 +128,7 @@ def reset_view(self):
         """
         self.camera.set_range()
 
-    def screenshot(self, region=None, size=None, bgcolor=None, crop=None):
+    def screenshot(self, region=None, size=None, bgcolor=None):
         """Render the scene to an offscreen buffer and return the image array.
 
         Parameters
@@ -144,18 +144,14 @@ def screenshot(self, region=None, size=None, bgcolor=None, crop=None):
             from the native canvas resolution.
         bgcolor : instance of Color | None
             The background color to use.
-        crop : array-like | None
-            If specified it determines the pixels read from the framebuffer.
-            In the format (x, y, w, h), relative to the region being rendered.
+
         Returns
         -------
         image : array
             Numpy array of type ubyte and shape (h, w, 4). Index [0, 0] is the
             upper-left corner of the rendered region.
-
         """
-        return self._canvas.render(region=None, size=None, bgcolor=None,
-                                   crop=None)
+        return self._canvas.render(region, size, bgcolor)
 
     def add_layer(self, layer):
         """Adds a layer to the viewer.


Test patch: