net.posprinter.utils

## Class BitmapProcess

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

-     public class BitmapProcess
      extends java.lang.Object

  Image processing For printers, there are image processing: such as image rotation, reverse, mirror printing, etc., you can also directly process the image before printing

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BitmapProcess()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static android.graphics.Bitmap` | `compressBmpByPrinterWidth(android.graphics.Bitmap bitmap, net.posprinter.utils.BitmapProcess.PrinterWidth printerWidth)` Compress the picture according to the width of the printing paper
    `static android.graphics.Bitmap` | `compressBmpByYourWidth(android.graphics.Bitmap bitmap, int w)` Compress the picture according to the width you give.
    `static java.util.List<android.graphics.Bitmap>` | `cutBitmap(int h, android.graphics.Bitmap bitmap)` Cutting picture method, cutting picture with equal height, return to List
    `static android.graphics.Bitmap` | `resizeImage(android.graphics.Bitmap bitmap, int w, boolean isOriginal)` Compress image width and height
    `static android.graphics.Bitmap` | `rotateBmp(android.graphics.Bitmap bitmap, net.posprinter.utils.BitmapProcess.RotateType rotateType)` Rotate picture

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

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

- - ### Constructor Detail

    - #### BitmapProcess

          public BitmapProcess()

  - ### Method Detail

    - #### compressBmpByPrinterWidth

          public static android.graphics.Bitmap compressBmpByPrinterWidth(android.graphics.Bitmap bitmap,
                                                                          net.posprinter.utils.BitmapProcess.PrinterWidth printerWidth)

      Compress the picture according to the width of the printing paper
      Parameters:
        `bitmap` -
        `printerWidth` -
      Returns:

    - #### compressBmpByYourWidth

          public static android.graphics.Bitmap compressBmpByYourWidth(android.graphics.Bitmap bitmap,
                                                                       int w)

      Compress the picture according to the width you give. If the picture width is larger than the given width, it will be compressed, otherwise it will not be compressed
      Parameters:
        `bitmap` -
        `w` -
      Returns:

    - #### rotateBmp

          public static android.graphics.Bitmap rotateBmp(android.graphics.Bitmap bitmap,
                                                          net.posprinter.utils.BitmapProcess.RotateType rotateType)

      Rotate picture
      Parameters:
        `bitmap` -
        `rotateType` -
      Returns:

    - #### cutBitmap

          public static java.util.List<android.graphics.Bitmap> cutBitmap(int h,
                                                                          android.graphics.Bitmap bitmap)

      Cutting picture method, cutting picture with equal height, return to List
      Parameters:
        `h` -
        `bitmap` -
      Returns:

    - #### resizeImage

          public static android.graphics.Bitmap resizeImage(android.graphics.Bitmap bitmap,
                                                            int w,
                                                            boolean isOriginal)

      Compress image width and height
      Parameters:
        `bitmap` -
        `w` -
        `isOriginal` -
      Returns: