Mac下.CR2格式图片批量转换

我的相机是佳能X7i型号,之前拍的照片都是.cr2格式,想上传照片到Flickr,因为格式原因上传不了,开始一张张手动格式转换,太傻瓜。直到今天,发现了这个,感觉太好了。

No need for slow and heavy Photoshop scripts for this one, you can do easily do this right from your terminal window.
This is possible using “sips”, an image editing tool already available on Mac which allows you to do all sorts of image manipulation, including resizing and converting.
So we first grab all RAW files in a folder,
We convert them to jpeg (or any other format),
And we output them somewhere else.

for i in .CR2; do sips -s format jpeg iout" {i%.}.jpg”; done
So you now can save some space in your card by skipping the RAW + JPG option :)

意思即为,在mac终端先cd对应目录,然后执行以下命令,目录下会多了一些jpg格式的图片。

for i in *.CR2; do sips -s format jpeg $i --out "${i%.*}.jpg"; done

你可能感兴趣的:(开发相关)