获取.bat文件中的图像文件尺寸 [英] Get image file dimensions in .bat file
本文介绍了获取.bat文件中的图像文件尺寸的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个bat文件,其中列出了代码所在的文件夹中所有图像的路径
I have a bat file that lists the paths of all images in a folder the code is
@echo off
break > infofile.txt
for /f "delims=" %%F in ('dir /b /s *.bmp') do (
echo %%F 1 1 1 100 100 >>infofile.txt
)
文本文件看起来像这样
The text file looks like this
C:\Users\Charles\Dropbox\trainer\temp\positive\rawdata\diags(1).bmp 1 1 1 100 100
C:\Users\Charles\Dropbox\trainer\temp\positive\rawdata\diags(348).bmp 1 1 1 100 100
C:\Users\Charles\Dropbox\trainer\temp\positive\rawdata\diags(353).bmp 1 1 1 100 100
我想做的是最后将100 100换成每个图像宽度和高度的尺寸..预先感谢.
What I want to do is replace the 100 100 at the end by the dimentions of each image width and height.. Thanks in advance.
推荐答案
查看全文