https://github.com/atomgomba/bflogoreplacer
Betaflight logo replacer module for Python3
https://github.com/atomgomba/bflogoreplacer
mcm osd python3
Last synced: 4 months ago
JSON representation
Betaflight logo replacer module for Python3
- Host: GitHub
- URL: https://github.com/atomgomba/bflogoreplacer
- Owner: atomgomba
- License: gpl-3.0
- Created: 2018-02-08T11:51:31.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-10-03T21:34:06.000Z (over 2 years ago)
- Last Synced: 2026-01-03T09:02:50.794Z (5 months ago)
- Topics: mcm, osd, python3
- Language: Python
- Homepage:
- Size: 25.4 KB
- Stars: 12
- Watchers: 1
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Betaflight Logo Replacer
This is a helper library written in Python3 for replacing the default logo with a custom one in an OSD font.
## Example usage
```python
from bflogoreplacer import replace_logo
with open("my-custom-font.mcm") as f:
f.write(replace_logo("digital.mcm", "my-logo.png"))
```
See [`samples/`](samples/) directory for example input/output.
## Notes on the source files
* image has to be exactly 288px×72px
* background must be full green (#00ff00)
* must use white and black colors only
* it's better to use RGB mode than RGBA (alpha is ignored anyway)
* green areas will be transparent on the OSD
* default Betaflight fonts can be obtained from the configurator's repo:
https://github.com/betaflight/betaflight-configurator/tree/master/resources/osd
## Legal
This module is released under the GPLv3 license. Some code were taken and modified from here:
https://github.com/Knifa/MAX7456-Font-Tools