Changeset 4680


Ignore:
Timestamp:
12/08/08 14:52:00 (11 years ago)
Author:
melissa
Message:

Fix for > 4 GB LSM files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/components/bio-formats/src/loci/formats/in/ZeissLSMReader.java

    r4672 r4680  
    819819    ifds = (Hashtable[]) newIFDs.toArray(new Hashtable[0]); 
    820820    thumbnailsRemoved = true; 
     821 
     822    // fix the offsets for > 4 GB files 
     823    for (int i=1; i<ifds.length; i++) { 
     824      long thisOffset = TiffTools.getStripOffsets(ifds[i])[0] & 0xffffffffL; 
     825      long prevOffset = TiffTools.getStripOffsets(ifds[i - 1])[0]; 
     826      if (prevOffset < 0) prevOffset &= 0xffffffffL; 
     827 
     828      if (prevOffset > thisOffset) { 
     829        thisOffset += 0xffffffffL; 
     830        ifds[i].put(new Integer(TiffTools.STRIP_OFFSETS), new Long(thisOffset)); 
     831      } 
     832    } 
    821833 
    822834    initMetadata(); 
Note: See TracChangeset for help on using the changeset viewer.