Changeset 1363


Ignore:
Timestamp:
08/25/06 15:21:38 (14 years ago)
Author:
curtis
Message:

Fix bug where isThisType(byte[]) would identify any file starting with II or MM
as a Leica TIFF file (I think?).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/formats/in/LeicaReader.java

    r1264 r1363  
    7979    if (block.length < 4) return false; 
    8080 
    81     if ((block[0] == 0x49 && block[1] == 0x49 && block[2] == 0x49 && 
     81    if (block.length < 8) { 
     82      // we can only check whether it is a TIFF 
     83      return (block[0] == 0x49 && block[1] == 0x49 && block[2] == 0x49 && 
    8284      block[3] == 0x49) || (block[0] == 0x4d && block[1] == 0x4d && 
    83       block[2] == 0x4d && block[3] == 0x4d)) 
    84     { 
    85       return true; 
    86     } 
    87  
    88     if (block.length < 8) return true; 
     85      block[2] == 0x4d && block[3] == 0x4d); 
     86    } 
    8987 
    9088    int ifdlocation = DataTools.bytesToInt(block, 4, true); 
Note: See TracChangeset for help on using the changeset viewer.