API Reference
Class
QrPngRenderer
Renders QR modules to a PNG image (RGBA8).
Inheritance
- Object
- QrPngRenderer
Methods
public static Byte[] Render(BitMatrix modules, QrPngRenderOptions opts) #Returns:
Byte[]Renders the QR module matrix to a PNG byte array.
Parameters
- modules CodeGlyphX.BitMatrix
- opts CodeGlyphX.Rendering.Png.QrPngRenderOptions
public static Byte[] RenderPixels(BitMatrix modules, QrPngRenderOptions opts, out Int32 widthPx, out Int32 heightPx, out Int32 stride) #Returns:
Byte[]Renders the QR module matrix to a raw RGBA pixel buffer (no PNG encoding).
Parameters
- modules CodeGlyphX.BitMatrix
- opts CodeGlyphX.Rendering.Png.QrPngRenderOptions
- widthPx System.Int32@
- heightPx System.Int32@
- stride System.Int32@
RenderToFile 2 overloads
public static String RenderToFile(BitMatrix modules, QrPngRenderOptions opts, String path) #Returns:
StringRenders the QR module matrix to a PNG file.
Parameters
- modules CodeGlyphX.BitMatrix
- QR modules.
- opts CodeGlyphX.Rendering.Png.QrPngRenderOptions
- Rendering options.
- path System.String
- Output file path.
Returns
The output file path.
public static String RenderToFile(BitMatrix modules, QrPngRenderOptions opts, String directory, String fileName) #Returns:
StringRenders the QR module matrix to a PNG file under the specified directory.
Parameters
- modules CodeGlyphX.BitMatrix
- QR modules.
- opts CodeGlyphX.Rendering.Png.QrPngRenderOptions
- Rendering options.
- directory System.String
- Output directory.
- fileName System.String
- Output file name.
Returns
The output file path.
public static Void RenderToStream(BitMatrix modules, QrPngRenderOptions opts, Stream stream) #Returns:
VoidRenders the QR module matrix to a PNG stream.
Parameters
- modules CodeGlyphX.BitMatrix
- QR modules.
- opts CodeGlyphX.Rendering.Png.QrPngRenderOptions
- Rendering options.
- stream System.IO.Stream
- Target stream.