I used ImageMagick for the scripted image manipulations; it can be installed on Windows, MacOS, or Linux.
Here are the token images I started with (all created with 2minutetabletop's handy token editor):
The following scripts create one subdirectory with shadowed versions of all .png files, and another subdirectory with sticker outlined versions. Both are intended to be run from the directory/folder containing the .png files you want to convert. They will both tolerate filenames that include spaces. (note that while the command for image conversions is "magick convert" on Windows, it's just "convert" with the linux package I installed)
#!/bin/bash
mkdir ./stickers
mkdir ./shadows
for fname in *.png; do
convert "${fname}" \( +clone -channel A -morphology EdgeOut Disk -channel RGB +level-colors white \) -background none -compose DstOver -flatten "./stickers/${fname}"
convert "${fname}" \( +clone -background black -shadow 70x5-10-10 \) -background none -compose DstOver -flatten "./shadows/${fname}"
done
Batch file for Windows:
@echo off
md stickers
md shadows
for /f "delims=|" %%F in ('dir /b *.png') do (
magick convert "%%F" ^( +clone -channel A -morphology EdgeOut Disk -channel RGB +level-colors white ^) -background none -compose DstOver -flatten "stickers\%%F"
magick convert "%%F" ^( +clone -background black -shadow 70x5-10-10 ^) -background none -compose DstOver -flatten "shadows\%%F"
)
Stickered and shadowed versions produced by the above:
The intensity, fuzziness, and position of the shadow can be adjusted. I used 70x5-10-10 for the scripts as shown, but here are some examples of how they look with other settings: