Changeset 2350


Ignore:
Timestamp:
02/27/07 13:59:23 (13 years ago)
Author:
curtis
Message:

Eliminate black bars in thumbnails.

Location:
trunk/loci/formats
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/formats/FormatReader.java

    r2320 r2350  
    406406  /* @see IFormatReader#getThumbSizeX(String) */ 
    407407  public int getThumbSizeX(String id) throws FormatException, IOException { 
    408     return THUMBNAIL_DIMENSION; 
     408    int sx = getSizeX(id); 
     409    int sy = getSizeY(id); 
     410    return sx > sy ? THUMBNAIL_DIMENSION : sx * THUMBNAIL_DIMENSION / sy; 
    409411  } 
    410412 
    411413  /* @see IFormatReader#getThumbSizeY(String) */ 
    412414  public int getThumbSizeY(String id) throws FormatException, IOException { 
    413     return THUMBNAIL_DIMENSION; 
     415    int sx = getSizeX(id); 
     416    int sy = getSizeY(id); 
     417    return sy > sx ? THUMBNAIL_DIMENSION : sy * THUMBNAIL_DIMENSION / sx; 
    414418  } 
    415419 
     
    467471  { 
    468472    return ImageTools.scale(openImage(id, no), 
    469       getThumbSizeX(id), getThumbSizeY(id), true); 
     473      getThumbSizeX(id), getThumbSizeY(id), false); 
    470474  } 
    471475 
  • trunk/loci/formats/whats-new.txt

    r2338 r2350  
     1* Better series preview thumbnails 
     2 
    132007 Feb 26: 
    24* Many bugfixes: Leica LEI, ICS, FV1000 OIB, OME-XML and others 
Note: See TracChangeset for help on using the changeset viewer.