public class ImageBinary extends Object
Constructor and Description |
---|
ImageBinary() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
encode(BufferedImage orig,
int targetX,
Bx5GScreenProfile.ScreenColorType colorType,
Bx5GScreenProfile.ScreenMatrixType matrixType)
根据区域座标将图文转换成 BX05 使用的点阵数据。
|
static byte[] |
encode(File file,
int targetX,
int targetWidth,
int targetHeight,
Bx5GScreenProfile.ScreenColorType colorType,
Bx5GScreenProfile.ScreenMatrixType matrixType)
根据区域座标将图档转换成 BX05 使用的点阵数据。
|
static byte[] |
encodeColorR(BufferedImage orig,
int targetX)
根据区域座标将图文转换成 BX05 使用的点阵数据。
|
static byte[] |
encodeColorRG(BufferedImage orig,
int targetX,
Bx5GScreenProfile.ScreenMatrixType matrixType)
根据区域座标将图文转换成 BX05 使用的点阵数据。
|
static byte[] |
encodeFrame(BufferedImage image,
Bx5GScreenProfile.ScreenColorType colorType,
Bx5GScreenProfile.ScreenMatrixType matrixType)
将图档转换成 BX05 使用的屏幕边框或区域边框使用的点阵数据。
|
static byte[] |
encodeFrame(File file,
Bx5GScreenProfile.ScreenColorType colorType,
Bx5GScreenProfile.ScreenMatrixType matrixType)
将图档转换成 BX05 使用的屏幕边框或区域边框使用的点阵数据。
|
static void |
print(byte[] data,
int height)
Console 列印。
|
static void |
printEx(byte[] data,
int height)
Console 列印。
|
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)
計算有效長度。
|
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, Bx5GScreenProfile.ScreenColorType colorType, Bx5GScreenProfile.ScreenMatrixType matrixType) throws IOException
image
- 图案。colorType
- 显示屏类型。matrixType
- 点阵类型。IOException
- 转换发生错误。public static byte[] encodeFrame(File file, Bx5GScreenProfile.ScreenColorType colorType, Bx5GScreenProfile.ScreenMatrixType matrixType) throws IOException
file
- 档案。colorType
- 显示屏类型。matrixType
- 点阵类型。IOException
- 转换发生错误。public static byte[] encode(File file, int targetX, int targetWidth, int targetHeight, Bx5GScreenProfile.ScreenColorType colorType, Bx5GScreenProfile.ScreenMatrixType matrixType) throws IOException
file
- 档案。targetX
- 图案显示在屏模的 X 座标。targetWidth
- 投射宽度。targetHeight
- 投射高度。colorType
- 显示屏类型。matrixType
- 点阵类型。IOException
- 转换发生错误。public static void print(byte[] data, int height)
data
- 图档点阵数据。height
- 图档高度。public static void printEx(byte[] data, int height)
data
- 图档点阵数据。height
- 图档高度。public static int validLen(BufferedImage image, Color background)
image
- 图案。background
- 背景色。public static byte[] encode(BufferedImage orig, int targetX, Bx5GScreenProfile.ScreenColorType colorType, Bx5GScreenProfile.ScreenMatrixType matrixType)
orig
- 图案。targetX
- 图案显示在屏模的 X 座标。colorType
- 显示屏类型。matrixType
- 点阵类型。public static byte[] encodeColorR(BufferedImage orig, int targetX)
orig
- 图案。targetX
- 图案显示在屏模的 X 座标。public static byte[] encodeColorRG(BufferedImage orig, int targetX, Bx5GScreenProfile.ScreenMatrixType matrixType)
orig
- 图案。targetX
- 图案显示在屏模的 X 座标。matrixType
- 点阵类型。Copyright © 2020 onbon4j. All rights reserved.