我从搅拌机创建图像,它们缺少我使用 bash 命令添加的 Exif 元数据exiv2
。(因为传递这些图像的软件将使用元数据。)
例如,我可以使用将图像宽度设置为 960 exiv2 -M"set Exif.Image.ImageWidth 960" image.jpg
,然后使用exiv2 -g Exif.Image.ImageWidth -Pv image.jpg
.
为了快速总结,我可以exiv2 image.jpg
获取一组 Exif 元数据的列表。这包括
$ exiv2 image.jpg
File name : image.jpg
File size : 32975 Bytes
MIME type : image/jpeg
Image size : 960 x 540
我如何使用它Image size
来设置Exif.Image.ImageWidth
和Exif.Image.ImageLength
在 bash 中?
标准的Exif 标签不会列出ImageSize
.