public class ImageBinary
extends java.lang.Object
| Constructor and Description |
|---|
ImageBinary() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
encode(java.awt.image.BufferedImage orig,
int targetX,
Bx5GScreenProfile.ScreenColorType colorType,
Bx5GScreenProfile.ScreenMatrixType matrixType)
根据区域座标将图文转换成 BX05 使用的点阵数据。
|
static byte[] |
encode(java.io.File file,
int targetX,
int targetWidth,
int targetHeight,
Bx5GScreenProfile.ScreenColorType colorType,
Bx5GScreenProfile.ScreenMatrixType matrixType)
根据区域座标将图档转换成 BX05 使用的点阵数据。
|
static byte[] |
encodeColorR(java.awt.image.BufferedImage orig,
int targetX)
根据区域座标将图文转换成 BX05 使用的点阵数据。
|
static byte[] |
encodeColorRG(java.awt.image.BufferedImage orig,
int targetX,
Bx5GScreenProfile.ScreenMatrixType matrixType)
根据区域座标将图文转换成 BX05 使用的点阵数据。
|
static byte[] |
encodeFrame(java.awt.image.BufferedImage image,
Bx5GScreenProfile.ScreenColorType colorType,
Bx5GScreenProfile.ScreenMatrixType matrixType)
将图档转换成 BX05 使用的屏幕边框或区域边框使用的点阵数据。
|
static byte[] |
encodeFrame(java.io.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(java.lang.String filePath,
java.awt.image.BufferedImage image)
将图档储存成 PNG 档案。
|
static java.awt.image.BufferedImage |
scale(java.awt.image.BufferedImage image,
int targetWidth,
int targetHeight)
缩放图档。
|
static int |
validLen(java.awt.image.BufferedImage image,
java.awt.Color background)
計算有效長度。
|
public static byte[] encode(java.awt.image.BufferedImage orig,
int targetX,
Bx5GScreenProfile.ScreenColorType colorType,
Bx5GScreenProfile.ScreenMatrixType matrixType)
orig - 图案。targetX - 图案显示在屏模的 X 座标。colorType - 显示屏类型。matrixType - 点阵类型。public static byte[] encode(java.io.File file,
int targetX,
int targetWidth,
int targetHeight,
Bx5GScreenProfile.ScreenColorType colorType,
Bx5GScreenProfile.ScreenMatrixType matrixType)
throws java.io.IOException
file - 档案。targetX - 图案显示在屏模的 X 座标。targetWidth - 投射宽度。targetHeight - 投射高度。colorType - 显示屏类型。matrixType - 点阵类型。java.io.IOException - 转换发生错误。public static byte[] encodeColorR(java.awt.image.BufferedImage orig,
int targetX)
orig - 图案。targetX - 图案显示在屏模的 X 座标。public static byte[] encodeColorRG(java.awt.image.BufferedImage orig,
int targetX,
Bx5GScreenProfile.ScreenMatrixType matrixType)
orig - 图案。targetX - 图案显示在屏模的 X 座标。matrixType - 点阵类型。public static byte[] encodeFrame(java.awt.image.BufferedImage image,
Bx5GScreenProfile.ScreenColorType colorType,
Bx5GScreenProfile.ScreenMatrixType matrixType)
throws java.io.IOException
image - 图案。colorType - 显示屏类型。matrixType - 点阵类型。java.io.IOException - 转换发生错误。public static byte[] encodeFrame(java.io.File file,
Bx5GScreenProfile.ScreenColorType colorType,
Bx5GScreenProfile.ScreenMatrixType matrixType)
throws java.io.IOException
file - 档案。colorType - 显示屏类型。matrixType - 点阵类型。java.io.IOException - 转换发生错误。public static void print(byte[] data,
int height)
data - 图档点阵数据。height - 图档高度。public static void printEx(byte[] data,
int height)
data - 图档点阵数据。height - 图档高度。public static boolean savePNG(java.lang.String filePath,
java.awt.image.BufferedImage image)
filePath - 档案路径。image - 图档。public static java.awt.image.BufferedImage scale(java.awt.image.BufferedImage image,
int targetWidth,
int targetHeight)
targetWidth - 水平缩放大小。targetHeight - 垂直缩放大小。public static int validLen(java.awt.image.BufferedImage image,
java.awt.Color background)
image - 图案。background - 背景色。