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
發佈了213 篇原創文章 · 獲贊 32 · 訪問量 31萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章