Looping through folders and output convert to txt file with filename
Posted: 2018-09-24T02:22:26-07:00
hi
I have a large number of images in nested folders. I would like to loop through the images (they are small pngs) and capture the average colour of the image and write to a text file. I've tried doing this with
magick convert *.png -resize 1x1 all.txt
which works but doesn't include the filename (so I know which line in the txt file is which image) and doesn't recurse through folders.
Does anyone know if this is possible with Imagemagick please? Ideally the output would be something like
Path;RGB
c:\test\image1.png;(100,50,200)
c:\test\image2.png;(106,20,103)
etc
Thanks
Rob
I have a large number of images in nested folders. I would like to loop through the images (they are small pngs) and capture the average colour of the image and write to a text file. I've tried doing this with
magick convert *.png -resize 1x1 all.txt
which works but doesn't include the filename (so I know which line in the txt file is which image) and doesn't recurse through folders.
Does anyone know if this is possible with Imagemagick please? Ideally the output would be something like
Path;RGB
c:\test\image1.png;(100,50,200)
c:\test\image2.png;(106,20,103)
etc
Thanks
Rob