BitmapToByteData

net.posprinter.utils

## Class BitmapToByteData

- java.lang.Object
- - net.posprinter.utils.BitmapToByteData

-     public class BitmapToByteData
      extends java.lang.Object

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `BitmapToByteData.BmpType`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BitmapToByteData()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static byte[]` | `downLoadBmpToSendData(android.graphics.Bitmap mBitmap, BitmapToByteData.BmpType bmpType)` Convert bitmap into byte [] and can be sent directly to the printer, and it is only a static method in this class For the use of definition download bitmaps instruction
    `static byte[]` | `downLoadBmpToSendTSCData(android.graphics.Bitmap mBitmap, BitmapToByteData.BmpType bmpType)` Convert bitmap into byte [] and can be sent directly to the printer, and it is only a static method in this class provide TSC to dowload bitmap date for send
    `static byte[]` | `flashBmpToSendData(android.graphics.Bitmap mBitmap, BitmapToByteData.BmpType bmpType)` Convert bitmap into byte [] and can be sent directly to the printer, and it is only a static method in this class provide to dowload Flash bitmap
    `static byte[]` | `rasterBmpToSendData(int m, android.graphics.Bitmap mBitmap, BitmapToByteData.BmpType bmpType)` Convert bitmap into byte [] and can be sent directly to the printer, and it is only a static method in this class provide to printer to printe the raster bitmap

    - ### Methods inherited from class java.lang.Object

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

- - ### Constructor Detail

    - #### BitmapToByteData

          public BitmapToByteData()

  - ### Method Detail

    - #### rasterBmpToSendData

          public static byte[] rasterBmpToSendData(int m,
                                   android.graphics.Bitmap mBitmap,
                                   BitmapToByteData.BmpType bmpType)

      Convert bitmap into byte [] and can be sent directly to the printer, and it is only a static method in this class provide to printer to printe the raster bitmap
      Parameters:
        `mBitmap` - Bitmap
        `bmpType` - The algorithm of bitmap processing type
      Returns:
        byte¡¾¡¿ byte array

    - #### flashBmpToSendData

          public static byte[] flashBmpToSendData(android.graphics.Bitmap mBitmap,
                                  BitmapToByteData.BmpType bmpType)

      Convert bitmap into byte [] and can be sent directly to the printer, and it is only a static method in this class provide to dowload Flash bitmap
      Parameters:
        `mBitmap` - Bitmap object
        `bmpType` - The algorithm of bitmap processing type
      Returns:
        byte¡¾¡¿ byte array

    - #### downLoadBmpToSendTSCData

          public static byte[] downLoadBmpToSendTSCData(android.graphics.Bitmap mBitmap,
                                        BitmapToByteData.BmpType bmpType)

      Convert bitmap into byte [] and can be sent directly to the printer, and it is only a static method in this class provide TSC to dowload bitmap date for send
      Parameters:
        `mBitmap` - Bitmap object
        `bmpType` - The algorithm of bitmap processing type
      Returns:
        byte¡¾¡¿ byte array

    - #### downLoadBmpToSendData

          public static byte[] downLoadBmpToSendData(android.graphics.Bitmap mBitmap,
                                     BitmapToByteData.BmpType bmpType)

      Convert bitmap into byte [] and can be sent directly to the printer, and it is only a static method in this class For the use of definition download bitmaps instruction
      Parameters:
        `mBitmap` - Bitmap object
        `bmpType` - The algorithm of bitmap processing type
      Returns:
        byte¡¾¡¿ byte array