Changeset 6108


Ignore:
Timestamp:
04/08/10 16:29:57 (10 years ago)
Author:
melissa
Message:

Fixed a couple of TIFF export bugs.

Location:
trunk/components/bio-formats/src/loci/formats
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/components/bio-formats/src/loci/formats/out/TiffWriter.java

    r6026 r6108  
    117117      false : !bigEndian.booleanValue(); 
    118118 
    119     tiffSaver = new TiffSaver(out); 
    120     tiffSaver.setLittleEndian(littleEndian); 
    121     tiffSaver.setBigTiff(isBigTiff); 
     119    if (initialized) { 
     120      tiffSaver = new TiffSaver(out); 
     121      tiffSaver.setLittleEndian(littleEndian); 
     122      tiffSaver.setBigTiff(isBigTiff); 
     123    } 
    122124 
    123125    if (!initialized) { 
    124126      initialized = true; 
    125127      out = new RandomAccessOutputStream(currentId); 
     128      tiffSaver = new TiffSaver(out); 
     129      tiffSaver.setLittleEndian(littleEndian); 
     130      tiffSaver.setBigTiff(isBigTiff); 
    126131 
    127132      RandomAccessInputStream tmp = new RandomAccessInputStream(currentId); 
  • trunk/components/bio-formats/src/loci/formats/tiff/TiffSaver.java

    r6026 r6108  
    247247    } 
    248248    long endFP = out.getFilePointer(); 
     249    if (last) endFP = 0; 
    249250 
    250251    out.seek(fp); 
     
    551552        if (extraBuf.length() > 0) { 
    552553          out.seek(newOffset); 
    553           out.write(extraBuf.getByteBuffer()); 
     554          out.write(extraBuf.getByteBuffer(), 0, newCount); 
    554555        } 
    555556        return; 
     
    618619      ifd.putIFDValue(IFD.ROWS_PER_STRIP, new long[] {1}); 
    619620    } 
     621    if (ifd.get(IFD.IMAGE_DESCRIPTION) == null) { 
     622      ifd.putIFDValue(IFD.IMAGE_DESCRIPTION, ""); 
     623    } 
    620624  } 
    621625 
Note: See TracChangeset for help on using the changeset viewer.