12-22-2021, 08:58 AM
Parsing the filename is always a pain. I use similar to generate several thousands tiles for picture mosaic creation where the double extension is no problem
A quick search, you have probably already seen this for Windows, https://jonlabelle.com/snippets/view/dos...-extension
On a more basic level if you can rename the 118 tiles dropping the .png extension IM will use the 'magick number' to identify the file type so (in linux) brick.png becomes brick = variable $1 and that works here:
A quick search, you have probably already seen this for Windows, https://jonlabelle.com/snippets/view/dos...-extension
On a more basic level if you can rename the 118 tiles dropping the .png extension IM will use the 'magick number' to identify the file type so (in linux) brick.png becomes brick = variable $1 and that works here:
Code:
#!/bin/bash
colval=`echo "ecbf99 d9a6ec b3ccec" `
for val in $colval
do
magick $1 -colorspace gray -fill "#$val" -tint 100 $1$val.png
done