update intro text, move files around

This commit is contained in:
javl
2023-05-02 18:10:30 +02:00
parent 3c6ea67da1
commit 2d483ace16
4 changed files with 235 additions and 227 deletions
+226
View File
@@ -0,0 +1,226 @@
* {
margin: 0;
padding: 0;
}
body{
font-family: arial;
}
.wrapper {
display: flex;
flex-direction: column;
margin: auto;
width: 900px;
}
.section {
margin: 10px 0;
}
.bottom-divider {
border-bottom: 2px solid #000000;
padding-bottom: 20px;
}
.sub-section {
clear: both;
margin-bottom: 1px;
}
.section,
.sub-section {
width: 100%;
}
.column {
float: left;
}
.column-center {
min-width: 160px;
text-align: center;
}
.column-right {
float: right;
}
.sub-section-title {
margin: 0 0 10px;
}
p {
margin: 20px 0;
}
.table {
display: table;
margin: 10px 0 0;
width: 100%;
}
.table-row {
display: table-row;
width: 100%;
}
.table-cell {
display: table-cell;
padding: 5px 0;
}
.table-cell:first-child {
width: 30%;
}
.table-cell:last-child {
width: 70%;
}
.table-cell:first-child label {
font-weight: bold;
}
.table-cell:last-child label {
margin-right: 10px;
}
.nested-table {
margin: 0;
}
.nested-table .table-cell {
color: #666;
font-size: .9em;
width: 200px;
}
#format-caption-container div {
color: #505050;
display: none;
font-size: .9em;
line-height: 1.4em;
padding: 10px 0 15px;
width: 100%;
}
.upload-note {
max-width: 300px;
}
.byte-input {
min-height: 160px;
min-width: 360px;
}
.code-output {
height: 200px;
width: 100%;
}
.note {
color: #666666;
font-size: .9em;
line-height: 1.4em;
margin: 3px 0;
}
.file-input-entry {
display: flex;
justify-content: space-between;
margin-bottom: 10px;
}
button,
input[type="file"] {
background: #00CB99;
border-radius: 3px;
border: none;
color: #fff;
font-size: .9em;
font-weight: bold;
margin: 10px 0;
padding: 4px 8px;
}
input[type="file"] {
font-size: 1.0em;
padding: 6px 20px;
}
.generate-button {
margin: 40px 0 20px;
}
.remove-button {
margin: 0 0 0 10px;
padding: 1px 4px;
}
.file-info {
color: #505050;
font-size: .7em;
margin-left: 20px;
max-width: 300px;
white-space: pre;
}
.size-input{
width: 45px;
}
.glyph-input {
width: 80px;
margin-left: 10px;
}
#image-size-settings {
list-style-type: none;
}
#image-size-settings li {
margin: 4px 0;
}
#images-canvas-container canvas {
border: 3px solid #88DAC5;
margin: 10px 15px;
}
#images-canvas-container {
align-items: flex-start;
display: flex;
flex-wrap: wrap;
}
#arduino-identifier,
#adafruit-gfx-settings,
#all-same-size {
display: none;
}
.msg {
font-size: 1.2em;
}
.error-msg {
color: #ff0000;
display: none;
}
h1{
padding: 10px;
color: white;
background-color: #00cb99;
}
.sp-block {
border: 1px solid rgb(65, 65, 65);
padding: .5rem;
border-radius: 1rem;
}
.sp-btn {
display: block;
margin-top: .5rem;
}
+9 -227
View File
@@ -11,239 +11,21 @@
<head>
<meta charset="UTF-8">
<title>image2cpp</title>
<script src="./dithering.js"></script>
<script src="./script.js"></script>
<style type="text/css">
* {
margin: 0;
padding: 0;
}
body{
font-family: arial;
}
.wrapper {
display: flex;
flex-direction: column;
margin: auto;
width: 900px;
}
.section {
margin: 10px 0;
}
.bottom-divider {
border-bottom: 2px solid #000000;
padding-bottom: 20px;
}
.sub-section {
clear: both;
margin-bottom: 1px;
}
.section,
.sub-section {
width: 100%;
}
.column {
float: left;
}
.column-center {
min-width: 160px;
text-align: center;
}
.column-right {
float: right;
}
.sub-section-title {
margin: 0 0 10px;
}
p {
margin: 20px 0;
}
.table {
display: table;
margin: 10px 0 0;
width: 100%;
}
.table-row {
display: table-row;
width: 100%;
}
.table-cell {
display: table-cell;
padding: 5px 0;
}
.table-cell:first-child {
width: 30%;
}
.table-cell:last-child {
width: 70%;
}
.table-cell:first-child label {
font-weight: bold;
}
.table-cell:last-child label {
margin-right: 10px;
}
.nested-table {
margin: 0;
}
.nested-table .table-cell {
color: #666;
font-size: .9em;
width: 200px;
}
#format-caption-container div {
color: #505050;
display: none;
font-size: .9em;
line-height: 1.4em;
padding: 10px 0 15px;
width: 100%;
}
.upload-note {
max-width: 400px;
}
.byte-input {
min-height: 160px;
min-width: 360px;
}
.code-output {
height: 200px;
width: 100%;
}
.note {
color: #666666;
font-size: .9em;
line-height: 1.4em;
margin: 3px 0;
}
.file-input-entry {
display: flex;
justify-content: space-between;
margin-bottom: 10px;
}
button,
input[type="file"] {
background: #00CB99;
border-radius: 3px;
border: none;
color: #fff;
font-size: .9em;
font-weight: bold;
margin: 10px 0;
padding: 4px 8px;
}
input[type="file"] {
font-size: 1.0em;
padding: 6px 20px;
}
.generate-button {
margin: 40px 0 20px;
}
.remove-button {
margin: 0 0 0 10px;
padding: 1px 4px;
}
.file-info {
color: #505050;
font-size: .7em;
margin-left: 20px;
max-width: 300px;
white-space: pre;
}
.size-input{
width: 45px;
}
.glyph-input {
width: 80px;
margin-left: 10px;
}
#image-size-settings {
list-style-type: none;
}
#image-size-settings li {
margin: 4px 0;
}
#images-canvas-container canvas {
border: 3px solid #88DAC5;
margin: 10px 15px;
}
#images-canvas-container {
align-items: flex-start;
display: flex;
flex-wrap: wrap;
}
#arduino-identifier,
#adafruit-gfx-settings,
#all-same-size {
display: none;
}
.msg {
font-size: 1.2em;
}
.error-msg {
color: #ff0000;
display: none;
}
h1{
padding: 10px;
color: white;
background-color: #00cb99;
}
</style>
<script src="./js/dithering.js"></script>
<script src="./js/script.js"></script>
<link rel="stylesheet" href="./css/style.css">
</head>
<body>
<div class="wrapper">
<section class="section">
<h1>image2cpp</h1>
<p>image2cpp is a simple tool to change images into byte arrays (or your array back into an image) for use with Arduino and (monochrome) displays such as OLEDs.
It was originally made to work with the Adafruit OLED library. An example sketch for Arduino and this library can be found <a href="https://github.com/javl/image2cpp/blob/master/oled_example/oled_example.ino" target="_blank">here</a>.</p>
<p><strong>image2cpp</strong> is a simple tool to change images into byte arrays (or arrays back into an images) for use with (monochrome) displays such as OLEDs on your Arduino or Raspberry Pi.<br>
It was originally made to work with the Adafruit OLED library (for which your can find an example sketch for Arduino <a href="https://github.com/javl/image2cpp/blob/master/oled_example/oled_example.ino" target="_blank">here</a>) but
has been expanded by the community to be useful in all kind of (embedded) projects.</p>
<p>More info (and credits) can be found in the <a href="https://github.com/javl/image2cpp" target="_blank">Github repository</a>. This is also where you can report any <a href="https://github.com/javl/image2cpp/issues" target="_blank">issues</a> you might come across.</p>
<p>This tool also works offline. Simply save this page to your computer and open the file in your browser.</p>
<p>
Did you find this tool useful? Feel free to support my open source software:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/446277394e49e1cae0b7c5ff388e05d3fe7b36f3b6d3e0c3ee987b12df19ac41/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73706f6e736f72732f6a61766c3f6c6162656c3d53706f6e736f72266c6f676f3d476974487562">
<p class="sp-block">
Did you find this tool useful? Feel free to support my open source software on Github:<br>
<a target="_blank" class="sp-btn" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/446277394e49e1cae0b7c5ff388e05d3fe7b36f3b6d3e0c3ee987b12df19ac41/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73706f6e736f72732f6a61766c3f6c6162656c3d53706f6e736f72266c6f676f3d476974487562">
<img src="https://camo.githubusercontent.com/446277394e49e1cae0b7c5ff388e05d3fe7b36f3b6d3e0c3ee987b12df19ac41/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73706f6e736f72732f6a61766c3f6c6162656c3d53706f6e736f72266c6f676f3d476974487562"
alt="GitHub Sponsor"
data-canonical-src="https://img.shields.io/github/sponsors/javl?label=Sponsor&amp;logo=GitHub"
View File
View File