57 lines
3.3 KiB
HTML
57 lines
3.3 KiB
HTML
---
|
|
title: 'Bitmap to C/C++ Converter'
|
|
description: 'Convert a JPEG or PNG file to a C/C++ byte array.'
|
|
category: [ tools ]
|
|
---
|
|
|
|
<script type="text/javascript" src="./converter.js"></script>
|
|
|
|
<div class="container" role="main">
|
|
<div class="row">
|
|
<div class="col-lg-12" id="bitmap-converter">
|
|
<h1>Bitmap Converter</h1>
|
|
<p>Convert image files and data into Marlin Boot Screens and Status Screen Logos for Graphical Displays. Dark colors show up as "on" pixels. Light colors will be transparent.</p>
|
|
<div class="file-selector">
|
|
<canvas id="preview-sm" width="32" height="32"></canvas>
|
|
<canvas id="preview-lg" width="32" height="32"></canvas>
|
|
<div id="err-box"></div>
|
|
<input type="text" id="pasted" size="30" autocomplete="off" />
|
|
<input type="file" id="file-input" accept="image/*" />
|
|
<div class="options">
|
|
<label title="Marlin 1.x"> <input type="radio" name="marlin-ver" value="1" /> Marlin 1.x</label>
|
|
<label title="Marlin 2.x"> <input type="radio" name="marlin-ver" value="2" checked="checked" /> Marlin 2.x</label>
|
|
<br/>
|
|
<label id="liton-lbl" title="Light pixels are solid."> <input type="checkbox" id="lit-on" /> Light</label>
|
|
<label title="Invert the output bits."> <input type="checkbox" id="inv-on" /> Invert</label>
|
|
<label title="Output in Binary (not Hex) format."> <input type="checkbox" id="bin-on" checked="checked" /> Binary</label>
|
|
<label title="Include an ASCII representation."> <input type="checkbox" id="ascii-on" /> ASCII Art</label>
|
|
<label title="Use UTF8 blocks instead of ASCII."> <input type="checkbox" id="skinny-on" /> Narrow</label>
|
|
<br/>
|
|
<label title="Generic bitmap."> <input type="radio" name="bitmap-type" value="bits" checked="checked" /> Bitmap</label>
|
|
<label title="Format for _Bootscreen.h"> <input type="radio" name="bitmap-type" value="boot" /> Boot</label>
|
|
<label title="Format for _Statusscreen.h"> <input type="radio" name="bitmap-type" value="stat" /> Status</label>
|
|
<span id="stat-sub">
|
|
:<label title="Right-justify the image."> <input type="checkbox" id="rj-on" /> >></label>
|
|
<label class="tbd" title="Overlay a bed image."> <input type="checkbox" id="bed-on" /> Bed</label>
|
|
<label class="tbd" title="Overlay a fan image."> <input type="checkbox" id="fan-on" /> Fan</label>
|
|
<label class="tbd"> Nozzles:
|
|
<select name="hotends" value="1">
|
|
<option value="0">0</option>
|
|
<option value="1">1</option>
|
|
<option value="2">2</option>
|
|
<option value="3">3</option>
|
|
<option value="4">4</option>
|
|
<option value="5">5</option>
|
|
</select>
|
|
</label>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<div id="cpp-container">
|
|
<p>Copy the following code into your <span id="where">program</span>:</p>
|
|
<textarea id="output" cols="80" rows="4" editable="false" wrap="off" readonly="readonly">Select or drop an image above.</textarea>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|