Class Dithering

java.lang.Object
br.com.setis.printer.Util.Dithering

public class Dithering extends Object
Classe para tratamento de imagens. Destina-se a transformação de imagens coloridas para imagens em preto e branco, ideais para impressoras térmicas.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    android.graphics.Bitmap
    floydSteinberg(android.graphics.Bitmap src)
    Executa algoritmo Floyd-Steinberg no bitmap informado.
    android.graphics.Bitmap
    threshold(android.graphics.Bitmap bitmap, int th)
    Executa algoritmo threshold no bitmap informado.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Dithering

      public Dithering()
  • Method Details

    • floydSteinberg

      public android.graphics.Bitmap floydSteinberg(android.graphics.Bitmap src)
      Executa algoritmo Floyd-Steinberg no bitmap informado.
      Parameters:
      src - - o bitmap a ser transformado.
    • threshold

      public android.graphics.Bitmap threshold(android.graphics.Bitmap bitmap, int th)
      Executa algoritmo threshold no bitmap informado.
      Parameters:
      bitmap - - bitmap a ser transformado.
      th - - limiar o qual define se uma dada cor sera preta ou branca.