java.lang.Object
org.miaixz.bus.extra.qrcode.render.ImageRender
- All Implemented Interfaces:
BitMatrixRender
QR code image renderer.
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Constructor Summary
ConstructorsConstructorDescriptionImageRender(QrConfig config, String imageType) Constructs anImageRenderwith the specified QR code configuration and image type. -
Method Summary
Modifier and TypeMethodDescriptionrender(com.google.zxing.common.BitMatrix matrix) Renders the givenBitMatrixinto aBufferedImage.voidrender(com.google.zxing.common.BitMatrix matrix, OutputStream out) Renders the givenBitMatrixto the specifiedOutputStream.
-
Constructor Details
-
ImageRender
Constructs anImageRenderwith the specified QR code configuration and image type.- Parameters:
config- The QR code configuration.imageType- The type of the image (e.g., "png", "jpg").
-
-
Method Details
-
render
Description copied from interface:BitMatrixRenderRenders the givenBitMatrixto the specifiedOutputStream.- Specified by:
renderin interfaceBitMatrixRender- Parameters:
matrix- TheBitMatrixto render.out- TheOutputStreamto write the rendered output to.
-
render
Renders the givenBitMatrixinto aBufferedImage.- Parameters:
matrix- TheBitMatrixrepresenting the QR code.- Returns:
- The rendered
BufferedImage.
-