large ndpi images on Windows

Benjamin Gilbert bgilbert at
Thu Apr 17 12:43:20 EDT 2014

On 04/17/2014 10:51 AM, jcupitt at wrote:
> Hi all, I'm having some trouble reading a large (>2GB) .ndpi image on
> 32-bit Windows. Has anyone got this working?

Hi John,

On 32-bit systems, OpenSlide 3.4.0 will try to read non-TIFF files > 2 
GB completely into memory, which can cause the process to abort when 
g_malloc() fails to allocate a buffer that large.  Fix here:

But you're having a different problem:

> openslide-write-png.exe: /home/john/pics/openslide/bild.ndpi: Can't
> validate JPEG for directory 4: Couldn't seek: Invalid argument

The fseek() at

should have been fseeko().  I'll get a fix pushed soon; thanks for the 

--Benjamin Gilbert

More information about the openslide-users mailing list