Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with a recolor of a folder of images to a set of hex colors.
#6
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:

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
Reply


Messages In This Thread
RE: Help with a recolor of a folder of images to a set of hex colors. - by rich2005 - 12-22-2021, 08:58 AM

Forum Jump: