Changeset 3454


Ignore:
Timestamp:
12/10/07 09:37:21 (12 years ago)
Author:
melissa
Message:

Retrieve the comment directly from the first IFD - don't use the value of metadata.get("Comment"), as this can be null.

File:
1 edited

Legend:

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

    r3360 r3454  
    243243  /* @see BaseTiffReader#initMetadataStore() */ 
    244244  protected void initMetadataStore() { 
    245     String comment = (String) getMeta("Comment"); 
     245    Object c = TiffTools.getIFDValue(ifds[0], TiffTools.IMAGE_DESCRIPTION); 
     246    String comment = null; 
     247    if (c instanceof String) comment = (String) c; 
     248    else if (c instanceof String[]) comment = ((String[]) c)[0]; 
    246249    metadata.remove("Comment"); 
    247250    MetadataStore store = getMetadataStore(); 
Note: See TracChangeset for help on using the changeset viewer.