Changeset 2383


Ignore:
Timestamp:
03/05/07 12:57:19 (13 years ago)
Author:
melissa
Message:

Updated to use getRGBChannelCount.

File:
1 edited

Legend:

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

    r2377 r2383  
    194194  { 
    195195    if (!id.equals(currentId)) initFile(id); 
    196     byte[] buf = new byte[sizeX[series] * sizeY[series] * sizeC[series] *  
     196    byte[] buf = new byte[sizeX[series] * sizeY[series] *  
     197      getRGBChannelCount(id) *  
    197198      FormatReader.getBytesPerPixel(pixelType[series])]; 
    198199    return openBytes(id, no, buf); 
     
    247248 
    248249    byte[] b = openBytes(id, no); 
    249     int s = getSeries(id); 
    250     int bytes = b.length / (sizeX[s] * sizeY[s]); 
    251     BufferedImage bi = ImageTools.makeImage(b, sizeX[s], sizeY[s], 
    252       bytes == 3 ? 3 : 1, false, bytes == 3 ? 1 : bytes, !littleEndian[s], 
    253       validBits[s]); 
     250    int bytes = b.length / (sizeX[series] * sizeY[series] *  
     251      getRGBChannelCount(id)); 
     252     
     253    BufferedImage bi = ImageTools.makeImage(b, sizeX[series], sizeY[series], 
     254      getRGBChannelCount(id), false, bytes, !littleEndian[series], 
     255      validBits[series]); 
    254256    updateMinMax(bi, no); 
    255257    return bi; 
     
    626628        } 
    627629        else if (entryName.equals("OibInfo.txt")) { /* ignore this */ } 
    628         else { 
    629           // INI-style metadata 
    630  
     630        else if (data[0] == (byte) 0xff && data[1] == (byte) 0xfe) { 
    631631          String ini = DataTools.stripString(new String(data)); 
    632632          StringTokenizer st = new StringTokenizer(ini, "\n"); 
Note: See TracChangeset for help on using the changeset viewer.