openslide/openslide — Issue #73: openslide_read_region() fails if w >= 32768 || h >= 32768
Author: bgilbert
Created: 2011-10-25 23:12:40+00:00
State: open
Labels: defect

@kedaru noticed that openslide_read_region() fails with a Cairo error if the requested width or height is large:

```
$ openslide-write-png Mirax/CMU-2.mrxs 0 0 0 32768 1 out.png

(process:31370): Openslide-CRITICAL **: cairo error: invalid value (typically too big) for the size of the input (surface, pattern, etc.)
openslide-write-png: cairo error: invalid value (typically too big) for the size of the input (surface, pattern, etc.)
$
```

It turns out that Cairo >= 1.10 [intentionally limits](http://cgit.freedesktop.org/cairo/commit/?id=9e45673e197d0f43e296483cc6b5ca6df94e7f02) surface dimensions to 16 bits.