|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectonbon.bx06.utils.ImageBinary
public class ImageBinary
图文点阵数据工具。
Constructor Summary | |
---|---|
ImageBinary()
|
Method Summary | |
---|---|
static byte[] |
blank(int width,
int height,
int targetX,
Bx6GScreenProfile.ScreenColorType colorType,
Bx6GScreenProfile.ScreenMatrixType matrixType)
根据区域座标将图文转换成 BX05 使用的点阵数据。 |
static int |
calcWidthBytes(BufferedImage orig,
int targetX,
boolean fullColor)
|
static byte[] |
encode(BufferedImage orig,
int targetX,
Bx6GScreenProfile.ScreenColorType colorType,
Bx6GScreenProfile.ScreenMatrixType matrixType)
根据区域座标将图文转换成 BX05 使用的点阵数据。 |
static byte[] |
encode(File file,
int targetX,
Bx6GScreenProfile.ScreenColorType colorType,
Bx6GScreenProfile.ScreenMatrixType matrixType)
根据区域座标将图档转换成 BX06 使用的点阵数据。 |
static byte[] |
encode(File file,
int targetX,
int targetWidth,
int targetHeight,
Bx6GScreenProfile.ScreenColorType colorType,
Bx6GScreenProfile.ScreenMatrixType matrixType)
根据区域座标将图档转换成 BX06 使用的点阵数据。 |
static byte[] |
encode(InputStream is,
int targetX,
Bx6GScreenProfile.ScreenColorType colorType,
Bx6GScreenProfile.ScreenMatrixType matrixType)
根据区域座标将图档转换成 BX06 使用的点阵数据。 |
static byte[] |
encode(InputStream is,
int targetX,
int targetWidth,
int targetHeight,
Bx6GScreenProfile.ScreenColorType colorType,
Bx6GScreenProfile.ScreenMatrixType matrixType)
根据区域座标将图档转换成 BX06 使用的点阵数据。 |
static byte[] |
encodeFrame(BufferedImage image,
Bx6GScreenProfile.ScreenColorType colorType,
Bx6GScreenProfile.ScreenMatrixType matrixType)
将图档转换成 BX06 使用的屏幕边框或区域边框使用的点阵数据。 |
static byte[] |
encodeFrame(File file,
Bx6GScreenProfile.ScreenColorType colorType,
Bx6GScreenProfile.ScreenMatrixType matrixType)
将图档转换成 BX06 使用的屏幕边框或区域边框使用的点阵数据。 |
static byte[] |
encodeFrame(InputStream is,
Bx6GScreenProfile.ScreenColorType colorType,
Bx6GScreenProfile.ScreenMatrixType matrixType)
将图档转换成 BX06 使用的屏幕边框或区域边框使用的点阵数据。 |
static int |
print(byte[] data,
int width,
int height)
|
static boolean |
savePNG(String filePath,
BufferedImage image)
将图档储存成 PNG 档案。 |
static BufferedImage |
scale(BufferedImage image,
int targetWidth)
缩放图档。 |
static BufferedImage |
scale(BufferedImage image,
int targetWidth,
int targetHeight)
缩放图档。 |
static int |
validLen(BufferedImage image,
Color background)
計算有效長度。 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ImageBinary()
Method Detail |
---|
public static boolean savePNG(String filePath, BufferedImage image)
filePath
- 档案路径。image
- 图档。
public static BufferedImage scale(BufferedImage image, int targetWidth)
image
- 原始图档。targetWidth
- 水平缩放大小。
public static BufferedImage scale(BufferedImage image, int targetWidth, int targetHeight)
image
- 图档。targetWidth
- 水平缩放大小。targetHeight
- 垂直缩放大小。
public static byte[] encodeFrame(BufferedImage image, Bx6GScreenProfile.ScreenColorType colorType, Bx6GScreenProfile.ScreenMatrixType matrixType) throws IOException
image
- 图案。colorType
- 显示屏类型。matrixType
- 点阵类型。
IOException
- 转换发生错误。public static byte[] encodeFrame(File file, Bx6GScreenProfile.ScreenColorType colorType, Bx6GScreenProfile.ScreenMatrixType matrixType) throws IOException
file
- 档案。colorType
- 显示屏类型。matrixType
- 点阵类型。
IOException
- 转换发生错误。public static byte[] encodeFrame(InputStream is, Bx6GScreenProfile.ScreenColorType colorType, Bx6GScreenProfile.ScreenMatrixType matrixType) throws IOException
is
- 档案。colorType
- 显示屏类型。matrixType
- 点阵类型。
IOException
- 转换发生错误。public static byte[] encode(File file, int targetX, Bx6GScreenProfile.ScreenColorType colorType, Bx6GScreenProfile.ScreenMatrixType matrixType) throws IOException
file
- 档案。targetX
- 图案显示在屏模的 X 座标。colorType
- 显示屏类型。matrixType
- 点阵类型。
IOException
- 转换发生错误。public static byte[] encode(InputStream is, int targetX, Bx6GScreenProfile.ScreenColorType colorType, Bx6GScreenProfile.ScreenMatrixType matrixType) throws IOException
is
- 档案。targetX
- 图案显示在屏模的 X 座标。colorType
- 显示屏类型。matrixType
- 点阵类型。
IOException
- 转换发生错误。public static byte[] encode(File file, int targetX, int targetWidth, int targetHeight, Bx6GScreenProfile.ScreenColorType colorType, Bx6GScreenProfile.ScreenMatrixType matrixType) throws IOException
file
- 档案。targetX
- 图案显示在屏模的 X 座标。targetWidth
- 投射宽度。targetHeight
- 投射高度。colorType
- 显示屏类型。matrixType
- 点阵类型。
IOException
- 转换发生错误。public static byte[] encode(InputStream is, int targetX, int targetWidth, int targetHeight, Bx6GScreenProfile.ScreenColorType colorType, Bx6GScreenProfile.ScreenMatrixType matrixType) throws IOException
is
- 档案。targetX
- 图案显示在屏模的 X 座标。targetWidth
- 投射宽度。targetHeight
- 投射高度。colorType
- 显示屏类型。matrixType
- 点阵类型。
IOException
- 转换发生错误。public static int print(byte[] data, int width, int height)
public static int validLen(BufferedImage image, Color background)
image
- 图案。background
- 背景色。
public static int calcWidthBytes(BufferedImage orig, int targetX, boolean fullColor)
public static byte[] blank(int width, int height, int targetX, Bx6GScreenProfile.ScreenColorType colorType, Bx6GScreenProfile.ScreenMatrixType matrixType)
width
- 寬度。height
- 高度。targetX
- 图案显示在屏模的 X 座标。colorType
- 显示屏类型。matrixType
- 点阵类型。
public static byte[] encode(BufferedImage orig, int targetX, Bx6GScreenProfile.ScreenColorType colorType, Bx6GScreenProfile.ScreenMatrixType matrixType)
orig
- 图案。targetX
- 图案显示在屏模的 X 座标。colorType
- 顏色模式。matrixType
- 显示屏类型。
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |