类 MatrixToImageWriter
- java.lang.Object
-
- cn.t.util.media.code.zxing.MatrixToImageWriter
-
public class MatrixToImageWriter extends Object
Writes aBitMatrixtoBufferedImage, file or stream. Provided here instead of core since it depends on Java SE libraries.- 作者:
- Sean Owen
-
-
方法概要
所有方法 静态方法 具体方法 已过时的方法 修饰符和类型 方法 说明 static 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 BufferedImagetoBufferedImage(com.google.zxing.common.BitMatrix matrix, cn.t.util.media.code.zxing.MatrixToImageConfig config)AstoBufferedImage(BitMatrix), but allows customization of the output.static voidwriteToFile(com.google.zxing.common.BitMatrix matrix, String format, File file)已过时。static voidwriteToFile(com.google.zxing.common.BitMatrix matrix, String format, File file, cn.t.util.media.code.zxing.MatrixToImageConfig config)static voidwriteToPath(com.google.zxing.common.BitMatrix matrix, String format, Path file)Writes aBitMatrixto a file with default configuration.static voidwriteToPath(com.google.zxing.common.BitMatrix matrix, String format, Path file, cn.t.util.media.code.zxing.MatrixToImageConfig config)AswriteToPath(BitMatrix, String, Path), but allows customization of the output.static voidwriteToStream(com.google.zxing.common.BitMatrix matrix, String format, OutputStream stream)Writes aBitMatrixto a stream with default configuration.static voidwriteToStream(com.google.zxing.common.BitMatrix matrix, String format, OutputStream stream, cn.t.util.media.code.zxing.MatrixToImageConfig config)AswriteToStream(BitMatrix, String, OutputStream), but allows customization of the output.
-
-
-
方法详细资料
-
toBufferedImage
public static 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. Uses default configuration.- 参数:
matrix-BitMatrixto write- 返回:
BufferedImagerepresentation of the input
-
toBufferedImage
public static BufferedImage toBufferedImage(com.google.zxing.common.BitMatrix matrix, cn.t.util.media.code.zxing.MatrixToImageConfig config)
AstoBufferedImage(BitMatrix), but allows customization of the output.- 参数:
matrix-BitMatrixto writeconfig- output configuration- 返回:
BufferedImagerepresentation of the input
-
writeToFile
@Deprecated public static void writeToFile(com.google.zxing.common.BitMatrix matrix, String format, File file) throws IOException
已过时。- 参数:
matrix-BitMatrixto writeformat- image formatfile- fileFileto write image to- 抛出:
IOException- if writes to the file fail
-
writeToPath
public static void writeToPath(com.google.zxing.common.BitMatrix matrix, String format, Path file) throws IOExceptionWrites aBitMatrixto a file with default configuration.- 参数:
matrix-BitMatrixto writeformat- image formatfile- filePathto write image to- 抛出:
IOException- if writes to the stream fail- 另请参阅:
toBufferedImage(BitMatrix)
-
writeToFile
@Deprecated public static void writeToFile(com.google.zxing.common.BitMatrix matrix, String format, File file, cn.t.util.media.code.zxing.MatrixToImageConfig config) throws IOException
- 参数:
matrix-BitMatrixto writeformat- image formatfile- fileFileto write image toconfig- output configuration- 抛出:
IOException- if writes to the file fail
-
writeToPath
public static void writeToPath(com.google.zxing.common.BitMatrix matrix, String format, Path file, cn.t.util.media.code.zxing.MatrixToImageConfig config) throws IOExceptionAswriteToPath(BitMatrix, String, Path), but allows customization of the output.- 参数:
matrix-BitMatrixto writeformat- image formatfile- filePathto write image toconfig- output configuration- 抛出:
IOException- if writes to the file fail
-
writeToStream
public static void writeToStream(com.google.zxing.common.BitMatrix matrix, String format, OutputStream stream) throws IOExceptionWrites aBitMatrixto a stream with default configuration.- 参数:
matrix-BitMatrixto writeformat- image formatstream-OutputStreamto write image to- 抛出:
IOException- if writes to the stream fail- 另请参阅:
toBufferedImage(BitMatrix)
-
writeToStream
public static void writeToStream(com.google.zxing.common.BitMatrix matrix, String format, OutputStream stream, cn.t.util.media.code.zxing.MatrixToImageConfig config) throws IOExceptionAswriteToStream(BitMatrix, String, OutputStream), but allows customization of the output.- 参数:
matrix-BitMatrixto writeformat- image formatstream-OutputStreamto write image toconfig- output configuration- 抛出:
IOException- if writes to the stream fail
-
-