Module bus.extra

Class ImageRender

java.lang.Object
org.miaixz.bus.extra.qrcode.render.ImageRender
All Implemented Interfaces:
BitMatrixRender

public class ImageRender extends Object implements BitMatrixRender
QR code image renderer.
Since:
Java 17+
Author:
Kimi Liu
  • Constructor Details

    • ImageRender

      public ImageRender(QrConfig config, String imageType)
      Constructs an ImageRender with 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

      public void render(com.google.zxing.common.BitMatrix matrix, OutputStream out)
      Description copied from interface: BitMatrixRender
      Renders the given BitMatrix to the specified OutputStream.
      Specified by:
      render in interface BitMatrixRender
      Parameters:
      matrix - The BitMatrix to render.
      out - The OutputStream to write the rendered output to.
    • render

      public BufferedImage render(com.google.zxing.common.BitMatrix matrix)
      Renders the given BitMatrix into a BufferedImage.
      Parameters:
      matrix - The BitMatrix representing the QR code.
      Returns:
      The rendered BufferedImage.