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.
#4
My two euros worth.

For a batch operation Imagemagick (IM) http://www.imagemagick.org is more suited than Gimp.  Even so it is not going to be easy and I do not know the best way for a Windows user.

Using your examples and IM a single conversion is straight forward,  note the "#.." for the colour.

Code:
magick brick.png -colorspace gray -fill "#4c2c66" -tint 100 brick4c2c66.png

Long time since I last used a Windows .bat file (Any Windows user suggestions more than welcome)
In linux, for a single file, producing 118 variations would look like this where the file name is passed as variable $1  as: https://i.imgur.com/Svc0d3u.jpg

Gets even more complicated extracting just the tile name (without extension) in a further loop.
Sorry not a lot of help for you. You could ask on the IM forum https://github.com/ImageMagick/ImageMagick/discussions where one of the moderators is a Windows user.

Edit: Just wondering why the brick4c2c66.png filesize is larger than brick.png filesize both are RGB mode, I could not see anything obvious but it did bring up one thing. The IM script makes an indexed image. Identical to RGB version and obviously much smaller.
Attached the IM coloured file to compare:


Attached Files Image(s)
   
Reply


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

Forum Jump: