congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
AsciiImage
Code IndexAdd Tabnine to your IDE (free)

How to use
AsciiImage
in
loci.formats.tools

Best Java code snippets using loci.formats.tools.AsciiImage (Showing top 3 results out of 315)

origin: openmicroscopy/bioformats

@Override
public String toString() {
 final int width = img.getWidth();
 final int height = img.getHeight();
 final StringBuilder sb = new StringBuilder();
 for (int y=0; y<height; y++) {
  for (int x=0; x<width; x++) {
   final int pix = img.getRGB(x, y);
   final int a = 0xff & (pix >> 24);
   final int r = 0xff & (pix >> 16);
   final int g = 0xff & (pix >> 8);
   final int b = 0xff & pix;
   final int avg = (r + g + b) / 3;
   sb.append(getChar(avg));
  }
  sb.append(NL);
 }
 return sb.toString();
}
origin: openmicroscopy/bioformats

LOGGER.info("");
LOGGER.info("Image #{}:", i);
LOGGER.info(new AsciiImage(img).toString());
origin: ome/formats-bsd

@Override
public String toString() {
 final int width = img.getWidth();
 final int height = img.getHeight();
 final StringBuilder sb = new StringBuilder();
 for (int y=0; y<height; y++) {
  for (int x=0; x<width; x++) {
   final int pix = img.getRGB(x, y);
   final int a = 0xff & (pix >> 24);
   final int r = 0xff & (pix >> 16);
   final int g = 0xff & (pix >> 8);
   final int b = 0xff & pix;
   final int avg = (r + g + b) / 3;
   sb.append(getChar(avg));
  }
  sb.append(NL);
 }
 return sb.toString();
}
loci.formats.toolsAsciiImage

Javadoc

A utility class for outputting a BufferedImage as ASCII text.

Most used methods

  • <init>
  • getChar
  • toString

Popular in Java

  • Creating JSON documents from java classes using gson
  • getSystemService (Context)
  • runOnUiThread (Activity)
  • getContentResolver (Context)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now