Skip to content

Instantly share code, notes, and snippets.

@johnelliott
Created April 20, 2020 03:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnelliott/a50b6743d4d99f0e4ee1d076c8624ee9 to your computer and use it in GitHub Desktop.
Save johnelliott/a50b6743d4d99f0e4ee1d076c8624ee9 to your computer and use it in GitHub Desktop.
Convert OpenTX model images with ImageMagick
#!/usr/local/bin/bash
# convert should be from ImageMagick 7+
# e.g. $ cat input.jpg | ./opentx-model-image-convert.sh > output.bmp
convert - \
-resize 64x32 \
-gravity center \
-extent 64x32 \
-colorspace gray \
-colors 16 \
-type palette \
BMP3:-
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment