Git Product home page Git Product logo

mcm2img's Introduction

MCM2IMG

Converts Maxim analog video overlay (for example, Betaflight and iNAV OSD) fonts to desired image format.

The Maxim format is documented here: https://www.maximintegrated.com/en/design/technical-documents/app-notes/4/4117.html

Useful for: previewing fonts, converting fonts for use in other applications, etc.

Usage

python3 mcm2img.py mcmfile.mcm font.bin [rawfmt] [R] [G] [B]

Example:

python3 mcm2img.py betaflight.mcm font.bin RGBA 0 255 0` for green font colour

mcmfile.mcm file can found in the Configurator for your flight controller of choice.

For Betaflight, this is at betaflight-configurator*\resources\osd\1

If rawfmt is specified, it's one of the (many) raw bitmap formats supported by Pillow: https://github.com/python-pillow/Pillow/blob/main/src/libImaging/Unpack.c#L1483 . RGBA is probably the most common thing you will want here.

Docker

The docker container will automatically convert all .mcm fonts found in /app/fonts with mcm2img.py

Volumes

Volume Path
fonts /app/fonts

Environment variables

Variable Comment Default
RGB Used to override the colour of the converted font 255 255 255

Building

To build the docker image locally please use the following command:

docker build . -t mcm2img:latest

Running

Copy the font files (.mcm only) somewhere and execute the following command:

docker run -v ${PWD}/fonts:/app/fonts -it mcm2img:latest

mcm2img's People

Contributors

bri3d avatar mpraeger avatar singlag avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

singlag knifa

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.