Mac下.CR2格式圖片批量轉換

躍然發表於2016-03-07

我的相機是佳能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 --out "
{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

相關文章