Changeset 3278


Ignore:
Timestamp:
10/16/07 08:22:15 (12 years ago)
Author:
melissa
Message:

Fixed indexed to RGB conversion.

Location:
trunk/loci/formats
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/formats/ChannelFiller.java

    r3197 r3278  
    7777  } 
    7878 
     79  /* @see IFormatReader#openBytes(int, byte[]) */ 
     80  public byte[] openBytes(int no, byte[] buf) 
     81    throws FormatException, IOException 
     82  { 
     83    buf = openBytes(no); 
     84    return buf; 
     85  } 
     86 
    7987  /* @see IFormatReader#openBytes(int) */ 
    8088  public byte[] openBytes(int no) throws FormatException, IOException { 
  • trunk/loci/formats/FormatReader.java

    r3253 r3278  
    341341  /* @see IFormatReader#openBytes(int) */ 
    342342  public byte[] openBytes(int no) throws FormatException, IOException { 
    343     byte[] buf = new byte[getSizeX() * getSizeY() * getRGBChannelCount() * 
     343    byte[] buf = new byte[getSizeX() * getSizeY() * 
     344      (isIndexed() ? 1 : getRGBChannelCount()) * 
    344345      FormatTools.getBytesPerPixel(getPixelType())]; 
    345346    return openBytes(no, buf); 
  • trunk/loci/formats/ImageTools.java

    r3268 r3278  
    18751875    for (int i=0; i<b.length; i++) { 
    18761876      for (int j=0; j<lut.length; j++) { 
    1877         rtn[j][i] = lut[j][b[i]]; 
     1877        rtn[j][i] = lut[j][b[i] & 0xff]; 
    18781878      } 
    18791879    } 
Note: See TracChangeset for help on using the changeset viewer.