类 MatrixToImageWriter
- java.lang.Object
-
- com.google.zxing.client.j2se.MatrixToImageWriter
-
public final class MatrixToImageWriter extends java.lang.ObjectWrites aBitMatrixtoBufferedImage, file or stream. Provided here instead of core since it depends on Java SE libraries.- 作者:
- Sean Owen
-
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static java.awt.image.BufferedImagetoBufferedImage(com.google.zxing.common.BitMatrix matrix)Renders aBitMatrixas an image, where "false" bits are rendered as white, and "true" bits are rendered as black.static java.awt.image.BufferedImagetoBufferedImage(com.google.zxing.common.BitMatrix matrix, MatrixToImageConfig config)AstoBufferedImage(BitMatrix), but allows customization of the output.static voidwriteToFile(com.google.zxing.common.BitMatrix matrix, java.lang.String format, java.io.File file)Writes aBitMatrixto a file.static voidwriteToFile(com.google.zxing.common.BitMatrix matrix, java.lang.String format, java.io.File file, MatrixToImageConfig config)AswriteToFile(BitMatrix, String, File), but allows customization of the output.static voidwriteToStream(com.google.zxing.common.BitMatrix matrix, java.lang.String format, java.io.OutputStream stream)Writes aBitMatrixto a stream.static voidwriteToStream(com.google.zxing.common.BitMatrix matrix, java.lang.String format, java.io.OutputStream stream, MatrixToImageConfig config)AswriteToStream(BitMatrix, String, OutputStream), but allows customization of the output.
-
-
-
方法详细资料
-
toBufferedImage
public static java.awt.image.BufferedImage toBufferedImage(com.google.zxing.common.BitMatrix matrix)
Renders aBitMatrixas an image, where "false" bits are rendered as white, and "true" bits are rendered as black.- 参数:
matrix- 像素点阵- 返回:
- 缓存Image对象
-
toBufferedImage
public static java.awt.image.BufferedImage toBufferedImage(com.google.zxing.common.BitMatrix matrix, MatrixToImageConfig config)AstoBufferedImage(BitMatrix), but allows customization of the output.- 参数:
matrix- 像素点阵config- 像素点阵转换为缓存Image对象的配置- 返回:
- 缓存Image对象
-
writeToFile
public static void writeToFile(com.google.zxing.common.BitMatrix matrix, java.lang.String format, java.io.File file) throws java.io.IOExceptionWrites aBitMatrixto a file.- 参数:
matrix- 像素点阵format- 文件格式file- 输出文件- 抛出:
java.io.IOException- IO异常java.io.IOException- IO异常java.io.IOException- IO异常- 另请参阅:
toBufferedImage(BitMatrix)
-
writeToFile
public static void writeToFile(com.google.zxing.common.BitMatrix matrix, java.lang.String format, java.io.File file, MatrixToImageConfig config) throws java.io.IOExceptionAswriteToFile(BitMatrix, String, File), but allows customization of the output.- 参数:
matrix- 像素点阵format- 文件格式file- 输出文件config- 像素点阵转换为缓存Image对象的配置- 抛出:
java.io.IOException- IO异常
-
writeToStream
public static void writeToStream(com.google.zxing.common.BitMatrix matrix, java.lang.String format, java.io.OutputStream stream) throws java.io.IOExceptionWrites aBitMatrixto a stream.- 参数:
matrix- 像素点阵format- 文件格式stream- 输出流- 抛出:
java.io.IOException- IO异常- 另请参阅:
toBufferedImage(BitMatrix)
-
writeToStream
public static void writeToStream(com.google.zxing.common.BitMatrix matrix, java.lang.String format, java.io.OutputStream stream, MatrixToImageConfig config) throws java.io.IOExceptionAswriteToStream(BitMatrix, String, OutputStream), but allows customization of the output.- 参数:
matrix- 像素点阵format- 文件格式stream- 输出流config- 像素点阵转换为缓存Image对象的配置- 抛出:
java.io.IOException- IO异常
-
-