Changeset 4109


Ignore:
Timestamp:
06/10/08 10:52:35 (12 years ago)
Author:
melissa
Message:

Fixed bug where openBytes returned a buffer filled with zeros.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/formats/in/ND2Reader.java

    r4094 r4109  
    129129    if (isJPEG) { 
    130130      in.seek(offsets[series][no]); 
    131       buf = new JPEG2000Codec().decompress(in, new Boolean[] { 
     131      byte[] tmp = new JPEG2000Codec().decompress(in, new Boolean[] { 
    132132        new Boolean(core.littleEndian[series]), 
    133133        new Boolean(core.interleaved[series])}); 
     134      System.arraycopy(tmp, 0, buf, 0, (int) Math.min(tmp.length, buf.length)); 
    134135    } 
    135136    else if (isLossless) { 
Note: See TracChangeset for help on using the changeset viewer.