Changeset 7339


Ignore:
Timestamp:
12/06/10 15:08:27 (9 years ago)
Author:
melissa
Message:

Fixed row reversal to work correctly with sub-images.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/components/bio-formats/src/loci/formats/in/MINCReader.java

    r7053 r7339  
    7676 
    7777    if (no < pixelData.length) { 
    78       for (int row=y; row<y+h; row++) { 
    79         if (row < pixelData[no].length && x + w <= pixelData[no][row].length) { 
    80           System.arraycopy(pixelData[no][row], x * bpp, buf, 
    81             (h - row + y - 1) * w * bpp, w * bpp); 
     78      for (int row=0; row<h; row++) { 
     79        int srcRow = getSizeY() - (row + y) - 1; 
     80        if (srcRow < pixelData[no].length && 
     81          x + w <= pixelData[no][srcRow].length) 
     82        { 
     83          System.arraycopy(pixelData[no][srcRow], x * bpp, buf, 
     84            row * w * bpp, w * bpp); 
    8285        } 
    8386      } 
Note: See TracChangeset for help on using the changeset viewer.