public final class MatrixToImageWriter
extends java.lang.Object
BitMatrix
to BufferedImage
,
file or stream. Provided here instead of core since it depends on
Java SE libraries.Modifier and Type | Method and Description |
---|---|
static java.awt.image.BufferedImage |
toBufferedImage(BitMatrix matrix)
Renders a
BitMatrix as an image, where "false" bits are rendered
as white, and "true" bits are rendered as black. |
static java.awt.image.BufferedImage |
toBufferedImage(BitMatrix matrix,
MatrixToImageConfig config)
As
toBufferedImage(BitMatrix) , but allows customization of the output. |
static void |
writeToFile(BitMatrix matrix,
java.lang.String format,
java.io.File file)
Writes a
BitMatrix to a file. |
static void |
writeToFile(BitMatrix matrix,
java.lang.String format,
java.io.File file,
MatrixToImageConfig config)
As
writeToFile(BitMatrix, String, File) , but allows customization of the output. |
static void |
writeToStream(BitMatrix matrix,
java.lang.String format,
java.io.OutputStream stream)
Writes a
BitMatrix to a stream. |
static void |
writeToStream(BitMatrix matrix,
java.lang.String format,
java.io.OutputStream stream,
MatrixToImageConfig config)
As
writeToStream(BitMatrix, String, OutputStream) , but allows customization of the output. |
public static java.awt.image.BufferedImage toBufferedImage(BitMatrix matrix)
BitMatrix
as an image, where "false" bits are rendered
as white, and "true" bits are rendered as black.public static java.awt.image.BufferedImage toBufferedImage(BitMatrix matrix, MatrixToImageConfig config)
toBufferedImage(BitMatrix)
, but allows customization of the output.public static void writeToFile(BitMatrix matrix, java.lang.String format, java.io.File file) throws java.io.IOException
BitMatrix
to a file.java.io.IOException
toBufferedImage(BitMatrix)
public static void writeToFile(BitMatrix matrix, java.lang.String format, java.io.File file, MatrixToImageConfig config) throws java.io.IOException
writeToFile(BitMatrix, String, File)
, but allows customization of the output.java.io.IOException
public static void writeToStream(BitMatrix matrix, java.lang.String format, java.io.OutputStream stream) throws java.io.IOException
BitMatrix
to a stream.java.io.IOException
toBufferedImage(BitMatrix)
public static void writeToStream(BitMatrix matrix, java.lang.String format, java.io.OutputStream stream, MatrixToImageConfig config) throws java.io.IOException
writeToStream(BitMatrix, String, OutputStream)
, but allows customization of the output.java.io.IOException