Skip to content

Instantly share code, notes, and snippets.

@ehrenfeu
Last active February 17, 2016 16:49
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 ehrenfeu/a44cc5a2021692f7c758 to your computer and use it in GitHub Desktop.
Save ehrenfeu/a44cc5a2021692f7c758 to your computer and use it in GitHub Desktop.
quick hack to render current time as an ImageJ text image
XRES=180
YRES=32
convert -size ${XRES}x${YRES} \
-background white \
-fill black \
-pointsize $YRES label:"$(date +%X)" \
-colorspace gray \
-compress none \
-depth 8 PGM:- |
tail -n +4 |
tr -d "\n" |
xargs -n $XRES > Desktop/imagej_textimage.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment