imagemagick¶
install imagemagick, for example with brew:
resize and keep aspect ratio¶
mogrify
can also overwrite existing files and do edits inline
resize on width:
resize on height:
svg to png¶
use convert
to create a png out of a svg file:
change the background color:
the background color can be specified like so:
png to svg¶
if you get an error like:
install potrace
:
and you should be good to go
webp to png¶
animated webp to gif¶
image to c array¶
useful if you're going crazy with some cool e-paper/e-ink displays and an esp32.
merge multiple images / screenshots¶
you can play around with the -tile
option to position them next to each other ... like tiles you know.
merge them vertically:
or horizontally:
align them using gravity
if you have multiple sizes and you want them aligned in the center: