Changeset 2842


Ignore:
Timestamp:
06/04/07 15:05:09 (13 years ago)
Author:
melissa
Message:

Fixed several smallish bugs.

Location:
trunk/loci/formats/in
Files:
5 edited

Legend:

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

    r2701 r2842  
    7272 
    7373    if (buf.length < core.sizeX[0] * core.sizeY[0] * numBytes) { 
    74       throw new FormatException("Buffer to small."); 
     74      throw new FormatException("Buffer too small."); 
    7575    } 
    7676 
  • trunk/loci/formats/in/BMPReader.java

    r2701 r2842  
    128128        for (int y=core.sizeY[0]-1; y>=0; y--) { 
    129129          for (int x=0; x<core.sizeX[0]; x++) { 
    130             buf[y*core.sizeX[0] + x + 2*pixels] = (byte) in.read(); 
    131             buf[y*core.sizeX[0] + x + pixels] = (byte) in.read(); 
    132             buf[y*core.sizeX[0] + x] = (byte) in.read(); 
    133             for (int j=0; j<(bpp - 24) / 8; j++) in.read(); 
     130            int off = y*core.sizeX[0] + x;  
     131            buf[2*core.sizeX[0]*core.sizeY[0] + off] = (byte) in.read(); 
     132            buf[core.sizeX[0]*core.sizeY[0] + off] = (byte) in.read(); 
     133            buf[off] = (byte) in.read(); 
    134134          } 
     135          in.skipBytes(2);  
    135136        } 
    136137      } 
     
    258259    core.imageCount[0] = 1; 
    259260    core.sizeZ[0] = 1; 
    260     //core.sizeC[0] = core.rgb[0] ? 3 : 1; 
    261261    core.sizeT[0] = 1; 
    262262    core.currentOrder[0] = "XYCTZ"; 
  • trunk/loci/formats/in/EPSReader.java

    r2701 r2842  
    6060  /* @see loci.formats.IFormatReader#isThisType(byte[]) */ 
    6161  public boolean isThisType(byte[] block) { 
    62     return false; 
     62    return new String(block).trim().startsWith("%!PS");  
    6363  } 
    6464 
  • trunk/loci/formats/in/ND2Reader.java

    r2720 r2842  
    537537    if (core.sizeT[0] == 0) core.sizeT[0] = 1; 
    538538 
     539    if (core.imageCount[0] < core.sizeZ[0] * core.sizeT[0] * core.sizeC[0]) { 
     540      core.sizeT[0] = core.imageCount[0]; 
     541      core.sizeZ[0] = 1; 
     542    }  
     543 
    539544    core.rgb[0] = core.sizeC[0] == 3; 
    540545    core.interleaved[0] = true; 
  • trunk/loci/formats/in/PNGReader.java

    r2557 r2842  
    3636 
    3737  /** Constructs a new PNGReader. */ 
    38   public PNGReader() { super("Portable Network Graphics", "png"); } 
     38  public PNGReader() { super("Portable Network Graphics", new String[] {"png", "pnm"}); } 
    3939 
    4040} 
Note: See TracChangeset for help on using the changeset viewer.