basically, if you compile @Wunkolo's libsai, and install keneric, you can register .sai files as a specific mime type, make a .desktop for that mime and throw it into a place returned by kf5-config --path services
, and it should just start generating if you have a keneric
with
case "${mime}" in
image/x-paint-tool-sai)
/path/to/Thumbnail "${file}" "${outfile}"
exit ;;