Changeset 6732


Ignore:
Timestamp:
07/26/10 15:44:47 (9 years ago)
Author:
curtis
Message:

Add a showinf easter egg. ;-)

Location:
trunk/components/bio-formats/src/loci/formats/tools
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/components/bio-formats/src/loci/formats/tools/ImageInfo.java

    r6723 r6732  
    101101  private boolean autoscale = false; 
    102102  private boolean preload = false; 
     103  private boolean ascii = false; 
    103104  private String omexmlVersion = null; 
    104105  private int start = 0; 
     
    177178        } 
    178179        else if (args[i].equals("-preload")) preload = true; 
     180        else if (args[i].equals("-ascii")) ascii = true; 
    179181        else if (args[i].equals("-xmlversion")) omexmlVersion = args[++i]; 
    180182        else if (args[i].equals("-crop")) { 
     
    795797 
    796798    // display pixels in image viewer 
    797     LOGGER.info(""); 
    798     LOGGER.info("Launching image viewer"); 
    799     ImageViewer viewer = new ImageViewer(); 
    800     viewer.setImages(reader, images); 
    801     viewer.setVisible(true); 
     799    if (ascii) { 
     800      for (int i=0; i<images.length; i++) { 
     801        final BufferedImage img = images[i]; 
     802        LOGGER.info(""); 
     803        LOGGER.info("Image #{}:", i); 
     804        LOGGER.info(new AsciiImage(img).toString()); 
     805      } 
     806    } 
     807    else { 
     808      LOGGER.info(""); 
     809      LOGGER.info("Launching image viewer"); 
     810      ImageViewer viewer = new ImageViewer(); 
     811      viewer.setImages(reader, images); 
     812      viewer.setVisible(true); 
     813    } 
    802814  } 
    803815 
Note: See TracChangeset for help on using the changeset viewer.