com.gprinter.command

## 类 GpUtils

- java.lang.Object
- - com.gprinter.command.GpUtils

-     public class GpUtils
      extends java.lang.Object

- - ### 字段概要

    字段
    限定符和类型 | 字段和说明
    --- | ---
    `static int` | `ALGORITHM_DITHER_16x16`
    `static int` | `ALGORITHM_DITHER_8x8`
    `static int` | `ALGORITHM_GRAYTEXTMODE`
    `static int` | `ALGORITHM_TEXTMODE`
    `static int` | `ATKINSON_DITHER`
    `static int[][]` | `COLOR_PALETTE`
    `static int` | `FLOYD_STEINBERG_DITHER`
    `static int` | `PAPER_58_WIDTH`
    `static int` | `PAPER_80_WIDTH`
    `(专用程序包) static java.lang.Integer[]` | `theSet1`
    `(专用程序包) static java.lang.Integer[]` | `theSet2`

  - ### 构造器概要

    构造器
    构造器和说明
    `GpUtils()`

  - ### 方法概要

    所有方法 静态方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `(专用程序包) static java.lang.String` | `addSpaceAfterArabicString(java.lang.String arabic, int number)`
    `static int[]` | `bitmapToBWPix_int(Bitmap mBitmap, int algorithm)`
    `static byte[]` | `bitmapToBWPix(Bitmap mBitmap)`
    `static byte[]` | `ByteTo_byte(java.util.Vector<java.lang.Byte> vector)`
    `static int` | `clamp(int value)`
    `(专用程序包) static boolean` | `compare(java.lang.Integer input, int i)`
    `(专用程序包) static void` | `copy(char[] array, java.lang.Integer[] originUnicode, int length)`
    `(专用程序包) static java.util.List<java.lang.Integer>` | `Deformation(java.util.List<java.lang.Integer> inputlist)`
    `static Bitmap` | `filter(Bitmap nbm, int width, int height)`
    `(专用程序包) static boolean` | `findInArray(java.lang.Integer[] integer, int input)`
    `(专用程序包) static int` | `Flag(boolean set1, boolean set2)`
    `int` | `getMethod()`
    `(专用程序包) static java.util.List<java.lang.Integer>` | `Hyphen(java.util.List<java.lang.Integer> list)`
    `(专用程序包) static char[]` | `integer2Character(java.lang.Integer[] integers)`
    `(专用程序包) static byte[]` | `pixToEscNvBitImageCmd(byte[] src, int width, int height)`
    `static byte[]` | `pixToEscRastBitImageCmd(byte[] src)`
    `(专用程序包) static byte[]` | `pixToEscRastBitImageCmd(byte[] src, int nWidth, int nMode)`
    `static byte[]` | `pixToLabelCmd(byte[] src)`
    `static byte[]` | `pixToTscCmd(int x, int y, int mode, byte[] src, int nWidth)`
    `static byte[]` | `printEscDraw(Bitmap bitmap)`
    `static byte[]` | `printTscDraw(int x, int y, LabelCommand.BITMAP_MODE mode, Bitmap bitmap)`
    `static byte[]` | `printZlibTscDraw(Bitmap bitmap)`
    `static Bitmap` | `resizeImage(Bitmap bitmap, int w, int h)`
    `(专用程序包) static java.lang.String` | `reverseLetterAndNumber(java.lang.String input)` 反转字母和数字
    `static void` | `saveMyBitmap(Bitmap mBitmap)`
    `static void` | `setMethod(int method)`
    `static void` | `setPaperWidth(int paperWidth)`
    `(专用程序包) static java.lang.String` | `splitArabic(java.lang.String input)`
    `(专用程序包) static byte[]` | `string2Cp864(java.lang.String arabicString)`
    `static Bitmap` | `toBinaryImage(Bitmap mBitmap, int nWidth, int algorithm)`
    `static Bitmap` | `toGrayscale(Bitmap bmpOriginal)`
    `static byte[]` | `ZlibpixToLabelCmd(byte[] src)`

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 字段详细资料

    - #### PAPER_58_WIDTH

          public static final int PAPER_58_WIDTH

      另请参阅:
        常量字段值

    - #### PAPER_80_WIDTH

          public static final int PAPER_80_WIDTH

      另请参阅:
        常量字段值

    - #### theSet1

          static java.lang.Integer[] theSet1

    - #### theSet2

          static java.lang.Integer[] theSet2

    - #### ALGORITHM_DITHER_16x16

          public static final int ALGORITHM_DITHER_16x16

      另请参阅:
        常量字段值

    - #### ALGORITHM_DITHER_8x8

          public static final int ALGORITHM_DITHER_8x8

      另请参阅:
        常量字段值

    - #### ALGORITHM_TEXTMODE

          public static final int ALGORITHM_TEXTMODE

      另请参阅:
        常量字段值

    - #### ALGORITHM_GRAYTEXTMODE

          public static final int ALGORITHM_GRAYTEXTMODE

      另请参阅:
        常量字段值

    - #### COLOR_PALETTE

          public static final int[][] COLOR_PALETTE

    - #### FLOYD_STEINBERG_DITHER

          public static final int FLOYD_STEINBERG_DITHER

      另请参阅:
        常量字段值

    - #### ATKINSON_DITHER

          public static final int ATKINSON_DITHER

      另请参阅:
        常量字段值

  - ### 构造器详细资料

    - #### GpUtils

          public GpUtils()

  - ### 方法详细资料

    - #### resizeImage

          public static Bitmap resizeImage(Bitmap bitmap,
                                           int w,
                                           int h)

    - #### saveMyBitmap

          public static void saveMyBitmap(Bitmap mBitmap)

    - #### toGrayscale

          public static Bitmap toGrayscale(Bitmap bmpOriginal)

    - #### pixToEscRastBitImageCmd

          static byte[] pixToEscRastBitImageCmd(byte[] src,
                                                int nWidth,
                                                int nMode)

    - #### pixToEscRastBitImageCmd

          public static byte[] pixToEscRastBitImageCmd(byte[] src)

    - #### pixToEscNvBitImageCmd

          static byte[] pixToEscNvBitImageCmd(byte[] src,
                                              int width,
                                              int height)

    - #### pixToLabelCmd

          public static byte[] pixToLabelCmd(byte[] src)

    - #### pixToTscCmd

          public static byte[] pixToTscCmd(int x,
                                           int y,
                                           int mode,
                                           byte[] src,
                                           int nWidth)

    - #### bitmapToBWPix

          public static byte[] bitmapToBWPix(Bitmap mBitmap)

    - #### bitmapToBWPix_int

          public static int[] bitmapToBWPix_int(Bitmap mBitmap,
                                                int algorithm)

    - #### toBinaryImage

          public static Bitmap toBinaryImage(Bitmap mBitmap,
                                             int nWidth,
                                             int algorithm)

    - #### clamp

          public static int clamp(int value)

    - #### filter

          public static Bitmap filter(Bitmap nbm,
                                      int width,
                                      int height)

    - #### printEscDraw

          public static byte[] printEscDraw(Bitmap bitmap)

    - #### printTscDraw

          public static byte[] printTscDraw(int x,
                                            int y,
                                            LabelCommand.BITMAP_MODE mode,
                                            Bitmap bitmap)

    - #### ZlibpixToLabelCmd

          public static byte[] ZlibpixToLabelCmd(byte[] src)

    - #### printZlibTscDraw

          public static byte[] printZlibTscDraw(Bitmap bitmap)

    - #### splitArabic

          static java.lang.String splitArabic(java.lang.String input)

    - #### addSpaceAfterArabicString

          static java.lang.String addSpaceAfterArabicString(java.lang.String arabic,
                                                            int number)

    - #### reverseLetterAndNumber

          static java.lang.String reverseLetterAndNumber(java.lang.String input)

      反转字母和数字
      参数:
        `input` -
      返回:

    - #### string2Cp864

          static byte[] string2Cp864(java.lang.String arabicString)

    - #### integer2Character

          static char[] integer2Character(java.lang.Integer[] integers)

    - #### copy

          static void copy(char[] array,
                           java.lang.Integer[] originUnicode,
                           int length)

    - #### Hyphen

          static java.util.List<java.lang.Integer> Hyphen(java.util.List<java.lang.Integer> list)

    - #### Deformation

          static java.util.List<java.lang.Integer> Deformation(java.util.List<java.lang.Integer> inputlist)

    - #### compare

          static boolean compare(java.lang.Integer input,
                                 int i)

    - #### findInArray

          static boolean findInArray(java.lang.Integer[] integer,
                                     int input)

    - #### Flag

          static int Flag(boolean set1,
                          boolean set2)

    - #### setPaperWidth

          public static void setPaperWidth(int paperWidth)

    - #### ByteTo_byte

          public static byte[] ByteTo_byte(java.util.Vector<java.lang.Byte> vector)

    - #### getMethod

          public int getMethod()

    - #### setMethod

          public static void setMethod(int method)