Changeset 4820


Ignore:
Timestamp:
02/18/09 14:13:02 (11 years ago)
Author:
melissa
Message:

Fixed a few more bugs exposed by the writer test suite.

Location:
trunk/components
Files:
4 edited

Legend:

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

    r4648 r4820  
    9797    FormatTools.checkBufferSize(this, buf.length, w, h); 
    9898 
    99     byte[] t = AWTImageTools.getBytes(openImage(no, x, y, w, h), false); 
    100     System.arraycopy(t, 0, buf, 0, buf.length); 
     99    byte[][] t = AWTImageTools.getPixelBytes(openImage(no, x, y, w, h), false); 
     100 
     101    for (int c=0; c<t.length; c++) { 
     102      System.arraycopy(t[c], 0, buf, c * t[c].length, t[c].length); 
     103    } 
    101104 
    102105    return buf; 
  • trunk/components/bio-formats/src/loci/formats/out/QTWriter.java

    r4705 r4820  
    186186 
    187187    int bytesPerPixel = byteData[0].length / (width * height); 
    188  
    189     if (bytesPerPixel > 1) { 
    190       throw new FormatException("Unsupported bits per pixel : " + 
    191         (8 * bytesPerPixel) + "."); 
    192     } 
    193188 
    194189    pad *= bytesPerPixel; 
     
    586581  /* @see loci.formats.IFormatWriter#getPixelTypes(String) */ 
    587582  public int[] getPixelTypes() { 
    588     return new int[] {FormatTools.UINT8, FormatTools.UINT16}; 
     583    return new int[] {FormatTools.UINT8}; 
    589584  } 
    590585 
  • trunk/components/loci-plugins/src/loci/plugins/Exporter.java

    r4804 r4820  
    258258          IJ.error("Pixel type not supported by this format."); 
    259259        } 
    260         else w.saveImage(img, i == end - 1); 
     260        else w.saveImage(img, i == end - n); 
    261261      } 
    262262      w.close(); 
  • trunk/components/test-suite/src/loci/tests/testng/FormatWriterTest.java

    r4811 r4820  
    166166          int expectedCount = 
    167167            config.getZ() * config.getT() * (expectRGB ? 1 : config.getC()); 
     168          if (TestTools.shortClassName(writer).equals("OMEXMLWriter")) { 
     169            expectedCount *= config.getC(); 
     170            expectRGB = false; 
     171          } 
    168172 
    169173          String expectedMD5 = config.getMD5(); 
Note: See TracChangeset for help on using the changeset viewer.