<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://boofcv.org/index.php?action=history&amp;feed=atom&amp;title=Example_Render_Aztec_Code</id>
	<title>Example Render Aztec Code - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://boofcv.org/index.php?action=history&amp;feed=atom&amp;title=Example_Render_Aztec_Code"/>
	<link rel="alternate" type="text/html" href="http://boofcv.org/index.php?title=Example_Render_Aztec_Code&amp;action=history"/>
	<updated>2026-04-10T08:22:15Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.36.2</generator>
	<entry>
		<id>http://boofcv.org/index.php?title=Example_Render_Aztec_Code&amp;diff=3214&amp;oldid=prev</id>
		<title>Peter: Created page with &quot;&lt;center&gt; &lt;gallery widths=400px heights=400px&gt; File:Example_render_aztec_code.png | Rendered Aztec Code from this example &lt;/gallery&gt; &lt;/center&gt;  This example shows how a [https:...&quot;</title>
		<link rel="alternate" type="text/html" href="http://boofcv.org/index.php?title=Example_Render_Aztec_Code&amp;diff=3214&amp;oldid=prev"/>
		<updated>2022-09-03T00:31:48Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;center&amp;gt; &amp;lt;gallery widths=400px heights=400px&amp;gt; File:Example_render_aztec_code.png | Rendered Aztec Code from this example &amp;lt;/gallery&amp;gt; &amp;lt;/center&amp;gt;  This example shows how a [https:...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;gallery widths=400px heights=400px&amp;gt;&lt;br /&gt;
File:Example_render_aztec_code.png | Rendered Aztec Code from this example&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example shows how a [https://en.wikipedia.org/wiki/Aztec_Code Aztec Codes] can be rendered into an image. Its easy to adapt the approach here for just about any file format, e.g. PDF. &lt;br /&gt;
&lt;br /&gt;
Example Code:&lt;br /&gt;
* [https://github.com/lessthanoptimal/BoofCV/blob/v0.41/examples/src/main/java/boofcv/examples/fiducial/ExampleRenderAztecCode.java ExampleRenderAztecCode.java]&lt;br /&gt;
&lt;br /&gt;
Concepts:&lt;br /&gt;
* Fiducials&lt;br /&gt;
* Micro QR Codes&lt;br /&gt;
&lt;br /&gt;
Relevant Examples/Tutorials:&lt;br /&gt;
* [[Tutorial_QRCodes|Tutorial QR Codes]]&lt;br /&gt;
* [[Example_Detect_Aztec_Code|Detecting Aztec Codes]]&lt;br /&gt;
&lt;br /&gt;
= Example Code =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
/**&lt;br /&gt;
 * An easy-to-use API is provided for creating your own Aztec Code marker. You can render it as an image or PDF&lt;br /&gt;
 * document.&lt;br /&gt;
 *&lt;br /&gt;
 * @author Peter Abeles&lt;br /&gt;
 * @see MicroQrCodeGenerator&lt;br /&gt;
 */&lt;br /&gt;
public class ExampleRenderAztecCode {&lt;br /&gt;
	public static void main( String[] args ) {&lt;br /&gt;
		// Create a marker to render. Almost everything about how the marker is constructed can be manually specified&lt;br /&gt;
		// or you can let it automatically select everything&lt;br /&gt;
		AztecCode marker = new AztecEncoder().addAutomatic(&amp;quot;Code 2D!&amp;quot;).fixate();&lt;br /&gt;
		// NOTE: The final function you call must be fixate(), that&amp;#039;s how it knows it&amp;#039;s done&lt;br /&gt;
&lt;br /&gt;
		// Render the marker as an image. It&amp;#039;s also possible to render as a PDF or your own custom format&lt;br /&gt;
		GrayU8 rendered = AztecGenerator.renderImage(/* pixel per square */ 10, /* border squares */ 1, marker);&lt;br /&gt;
&lt;br /&gt;
		// Convert it to a BufferedImage for display purposes&lt;br /&gt;
		BufferedImage output = ConvertBufferedImage.convertTo(rendered, null);&lt;br /&gt;
&lt;br /&gt;
		// You can also save it to disk by uncommenting the line below&lt;br /&gt;
//		UtilImageIO.saveImage(output, &amp;quot;aztec.png&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
		// Display the rendered marker&lt;br /&gt;
		ShowImages.showWindow(output, &amp;quot;Rendered Aztec Code&amp;quot;, true);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Peter</name></author>
	</entry>
</feed>