large ndpi images on Windows

Benjamin Gilbert bgilbert at cs.cmu.edu
Thu Apr 17 12:43:20 EDT 2014


On 04/17/2014 10:51 AM, jcupitt at gmail.com 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:

     https://github.com/openslide/openslide/commit/5b1a96fb

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

 
https://github.com/openslide/openslide/blob/master/src/openslide-vendor-hamamatsu.c#L391

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

--Benjamin Gilbert



More information about the openslide-users mailing list