Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
4461fcd5
Commit
4461fcd5
authored
Dec 15, 2015
by
Arnim Läuger
Browse files
Merge pull request #853 from pastukhov/dev
Readme for u8glib app to dev
parents
0386ae65
5cb27f89
Changes
1
Show whitespace changes
Inline
Side-by-side
app/u8glib/README.md
0 → 100644
View file @
4461fcd5
##U8glib package
Ported from https://github.com/olikraus/u8glib
Here is black magic with ImageMagic package for image conversion:
```
bash
#!/bin/bash
mkdir
out
for
icon
in
*
png
;
do
convert
$icon
-depth
1 ./out/
$(
basename
$icon
.png
)
_1bpp.png
if
[[
"
$icon
"
==
*
"black"
*
]]
;
then
convert ./out/
$(
basename
$icon
.png
)
_1bpp.png
-background
white
-alpha
Background ./out/
$(
basename
$icon
.png
)
_1bpp.xbm
else
convert ./out/
$(
basename
$icon
.png
)
_1bpp.png
-background
black
-alpha
Background ./out/
$(
basename
$icon
.png
)
_1bpp.xbm
fi
cat
./out/
$(
basename
$icon
.png
)
_1bpp.xbm |
tr
'\n'
' '
|
tr
-d
" "
|sed
-e
s
'#^.*{##g'
|
sed
s
'#,}##'
|sed s
'/;//'
| xxd
-r
-p
>
./out/
$(
basename
$icon
.png
)
.xbm.mono
done
rm
out/
*
png out/
*
xbm
```
Convert all the png in the current folder and put resulting .mono to ./out
The convert binary is a part of ImageMagic package. You need to install it.
```
sudo apt-get install imagemagick
```
for Debian/Ubuntu.
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment