public class BitmapProcess
extends java.lang.Object
| 构造器和说明 |
|---|
BitmapProcess() |
| 限定符和类型 | 方法和说明 |
|---|---|
static Bitmap |
compressBmpByPrinterWidth(Bitmap bitmap,
net.posprinter.utils.BitmapProcess.PrinterWidth printerWidth)
按打印纸宽度压缩图片
图片宽度大于打印宽度则压缩,否则不压缩
|
static Bitmap |
compressBmpByYourWidth(Bitmap bitmap,
int w)
按照你给定的宽度来压缩图片
图片宽度大于给定的宽度则压缩,否则不压缩
|
static java.util.List<Bitmap> |
cutBitmap(int h,
Bitmap bitmap)
切割图片方法 ,等高切割图片,返回List
|
static Bitmap |
resizeImage(Bitmap bitmap,
int w,
boolean isOriginal)
压缩图片宽高
|
static Bitmap |
rotateBmp(Bitmap bitmap,
net.posprinter.utils.BitmapProcess.RotateType rotateType)
旋转图片
|
public static Bitmap compressBmpByPrinterWidth(Bitmap bitmap,
net.posprinter.utils.BitmapProcess.PrinterWidth printerWidth)
bitmap - 需要操作的位图对象printerWidth - 打印机的打印纸宽度类型(枚举)public static Bitmap compressBmpByYourWidth(Bitmap bitmap,
int w)
bitmap - 位图对象w - 你希望压缩的宽度,超过图片宽度不压缩public static Bitmap rotateBmp(Bitmap bitmap,
net.posprinter.utils.BitmapProcess.RotateType rotateType)
public static java.util.List<Bitmap> cutBitmap(int h,
Bitmap bitmap)
h - 高度bitmap - 需要切割的图片public static Bitmap resizeImage(Bitmap bitmap,
int w,
boolean isOriginal)
bitmap - 图片w - 需要压缩成的宽度isOriginal - 是否原图打印