【发布时间】:2018-12-05 11:57:44
【问题描述】:
使用exiv2,可以在终端输出图像信息。但是,它会输出几行信息:
exiv2 -ps ~/filelocation/filename.jpg
输出如下:
File name : ~/filelocation/filename.jpg
File size : 12345 Bytes
MIME type : image/jpeg
Image size : 800 x 600
~/filelocation/filename.jpg: No Exif data found in the file
如何命令终端只输出图像大小数据?
我真正想要的是:
exiv2 -ps ~/filelocation/filename.jpg [some command here]
输出:
800 x 600
【问题讨论】:
-
你尝试了什么?将您的努力与问题一起发布
-
exiv2 -ps /filelocation/filename.jpg | grep "图像大小" | awk -F ':' '{print $2}' 这让我很接近,但我想不通。