Here's one that I made

Ideally I would like to be able to read text from a .txt file (including line breaks) and have each character or word be appended and appear one character or word per image file.
I'm using ImageMagick 7.0.8-14 on Ubuntu 18.10.
I've done similar tasks with animated text, so from my experience here's a concept to "type" a single line of text using IM7.hellocatfood wrote: ↑2019-02-20T03:53:21-07:00Ideally I would like to be able to read text from a .txt file (including line breaks) and have each character or word be appended and appear one character or word per image file.
Code: Select all
magick -font courier-new-bold -pointsize 24 \
label:"XXXXXXXXXX" -set option:each %[fx:round(u.w/10)] +delete \
label:@textfile.txt -crop %[each]x0 -coalesce \
-set delay 10 \( -clone -1 -set delay 50 \) -loop 0 typing.gif
Code: Select all
@echo off
setlocal enabledelayedexpansion
set FONT=courbd.ttf
set POINTS=18
set COUNT=0
for /f "tokens=*" %%L in ( textfile.txt ) do (
magick ^
-font %FONT% ^
-pointsize %POINTS% ^
-kerning 1 ^
label:"\ %%L " ^
label:"XXXXXXXXXX" ^
-colors 16 ^
-crop "%%[fx:round(u.w/(v.w/10))]x1@" ^
-delete -10--1 ^
-background white ^
-coalesce ^
+repage ^
-set delay "%%[fx:t==0||t==(n-1)?75:10]" ^
^( ^
-clone -1,-1,-1,-1 ^
-distort affine "0,%%[fx:(t+1)*h/n] 0,0 " ^
-set delay 10 ^
^) ^
-loop 0 ^
_tmp_!COUNT!.miff
set /a COUNT+=1
)
magick _tmp_*.miff ^
( ^
-clone 0--1 ^
+repage ^
-layers merge ^
) ^
+insert ^
-loop 0 ^
typewriter.gif
del _tmp_*.miff
exit /b