extract hex code and append to file name
Posted: 2018-01-13T19:29:51-07:00
Hi, I'm a first time user trying to solve a problem.
I have a directory full of single color images to be used as color swatches for a web site. There are thousands of them. I need to extract the #hex code from each image and then save it with the hex code appended to the end of the image.
For example an imagecalled dt_black.gif has a hex code of #232323, i would like to have the program extract the hex code from the image and rename ,make a copy of the image in a new directory, appending the extracted color code to the end, so the new file would be called called dt_black-#232323.gif
If that is possible, please advise on how it can be done.
Thank you
Alex
I have a directory full of single color images to be used as color swatches for a web site. There are thousands of them. I need to extract the #hex code from each image and then save it with the hex code appended to the end of the image.
For example an imagecalled dt_black.gif has a hex code of #232323, i would like to have the program extract the hex code from the image and rename ,make a copy of the image in a new directory, appending the extracted color code to the end, so the new file would be called called dt_black-#232323.gif
If that is possible, please advise on how it can be done.
Thank you
Alex