Changeset 5974


Ignore:
Timestamp:
02/27/10 14:13:26 (10 years ago)
Author:
melissa
Message:

Fixed how 32-bit AVIs are handled.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/cleanup/components/bio-formats/src/loci/formats/in/AVIReader.java

    r5852 r5974  
    512512    core[0].littleEndian = true; 
    513513    core[0].interleaved = bmpBitsPerPixel != 16; 
    514     if (bytesPerPlane == 0 || bmpBitsPerPixel == 24) { 
     514    if (bmpBitsPerPixel == 32) { 
     515      core[0].sizeC = 4; 
     516      core[0].rgb = true; 
     517    } 
     518    else if (bytesPerPlane == 0 || bmpBitsPerPixel == 24) { 
    515519      core[0].rgb = 
    516520        (bmpBitsPerPixel > 8 || (bmpCompression != 0)) && lut == null; 
     
    522526      core[0].rgb = getSizeC() > 1; 
    523527    } 
    524     core[0].dimensionOrder = getSizeC() == 3 ? "XYCTZ" : "XYTCZ"; 
     528    core[0].dimensionOrder = isRGB() ? "XYCTZ" : "XYTCZ"; 
    525529    core[0].falseColor = false; 
    526530    core[0].metadataComplete = true; 
     
    531535    } 
    532536    else if (bmpBitsPerPixel == 16) core[0].pixelType = FormatTools.UINT16; 
    533     else if (bmpBitsPerPixel == 32) core[0].pixelType = FormatTools.UINT32; 
    534     else if (bmpBitsPerPixel == 24) core[0].pixelType = FormatTools.UINT8; 
     537    else if (bmpBitsPerPixel == 24 || bmpBitsPerPixel == 32) { 
     538      core[0].pixelType = FormatTools.UINT8; 
     539    } 
    535540    else { 
    536541      throw new FormatException( 
  • trunk/components/bio-formats/src/loci/formats/in/AVIReader.java

    r5765 r5974  
    513513    core[0].littleEndian = true; 
    514514    core[0].interleaved = bmpBitsPerPixel != 16; 
    515     if (bytesPerPlane == 0 || bmpBitsPerPixel == 24) { 
     515    if (bmpBitsPerPixel == 32) { 
     516      core[0].sizeC = 4; 
     517      core[0].rgb = true; 
     518    } 
     519    else if (bytesPerPlane == 0 || bmpBitsPerPixel == 24) { 
    516520      core[0].rgb = 
    517521        (bmpBitsPerPixel > 8 || (bmpCompression != 0)) && lut == null; 
     
    523527      core[0].rgb = getSizeC() > 1; 
    524528    } 
    525     core[0].dimensionOrder = getSizeC() == 3 ? "XYCTZ" : "XYTCZ"; 
     529    core[0].dimensionOrder = isRGB() ? "XYCTZ" : "XYTCZ"; 
    526530    core[0].falseColor = false; 
    527531    core[0].metadataComplete = true; 
     
    532536    } 
    533537    else if (bmpBitsPerPixel == 16) core[0].pixelType = FormatTools.UINT16; 
    534     else if (bmpBitsPerPixel == 32) core[0].pixelType = FormatTools.UINT32; 
    535     else if (bmpBitsPerPixel == 24) core[0].pixelType = FormatTools.UINT8; 
     538    else if (bmpBitsPerPixel == 24 || bmpBitsPerPixel == 32) { 
     539      core[0].pixelType = FormatTools.UINT8; 
     540    } 
    536541    else { 
    537542      throw new FormatException( 
Note: See TracChangeset for help on using the changeset viewer.