Changeset 6753


Ignore:
Timestamp:
07/29/10 20:20:13 (9 years ago)
Author:
melissa
Message:

Fixed saveBytes and savePlane implementations to use the correct image width and height. Noticed by David Smith.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.2/components/bio-formats/src/loci/formats/FormatWriter.java

    r6663 r6753  
    108108  public void saveBytes(int no, byte[] buf) throws FormatException, IOException 
    109109  { 
    110     int width = metadataRetrieve.getPixelsSizeX(0).getValue(); 
    111     int height = metadataRetrieve.getPixelsSizeY(0).getValue(); 
     110    int width = metadataRetrieve.getPixelsSizeX(series).getValue(); 
     111    int height = metadataRetrieve.getPixelsSizeY(series).getValue(); 
    112112    saveBytes(no, buf, 0, 0, width, height); 
    113113  } 
     
    117117    throws FormatException, IOException 
    118118  { 
    119     int width = metadataRetrieve.getPixelsSizeX(0).getValue(); 
    120     int height = metadataRetrieve.getPixelsSizeY(0).getValue(); 
     119    int width = metadataRetrieve.getPixelsSizeX(series).getValue(); 
     120    int height = metadataRetrieve.getPixelsSizeY(series).getValue(); 
    121121    savePlane(no, plane, 0, 0, width, height); 
    122122  } 
  • trunk/components/bio-formats/src/loci/formats/FormatWriter.java

    r6747 r6753  
    108108  public void saveBytes(int no, byte[] buf) throws FormatException, IOException 
    109109  { 
    110     int width = metadataRetrieve.getPixelsSizeX(0).getValue(); 
    111     int height = metadataRetrieve.getPixelsSizeY(0).getValue(); 
     110    int width = metadataRetrieve.getPixelsSizeX(getSeries()).getValue(); 
     111    int height = metadataRetrieve.getPixelsSizeY(getSeries()).getValue(); 
    112112    saveBytes(no, buf, 0, 0, width, height); 
    113113  } 
     
    117117    throws FormatException, IOException 
    118118  { 
    119     int width = metadataRetrieve.getPixelsSizeX(0).getValue(); 
    120     int height = metadataRetrieve.getPixelsSizeY(0).getValue(); 
     119    int width = metadataRetrieve.getPixelsSizeX(getSeries()).getValue(); 
     120    int height = metadataRetrieve.getPixelsSizeY(getSeries()).getValue(); 
    121121    savePlane(no, plane, 0, 0, width, height); 
    122122  } 
Note: See TracChangeset for help on using the changeset viewer.