Reputation: 476
Is it possible to create a list of image files in a directory with their file names and the width and height in pixels, and save it as a CSV, for instance?
Thank you!
Upvotes: 0
Views: 263
Reputation: 207465
You can use ImageMagick:
identify -format '%w,%h,%f\n' *.jpg *.png *.tif > images.csv
Sample Output
474,478,a.jpg
500,505,b.jpg
2756,1034,image.jpg
1830,1830,result.jpg
600,600,test.jpg
If you are running any disreputable OSes from Redmond that need to be told twice it's the end of the line, change \n
to \r\n
.
Upvotes: 1