Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學

Mac 截圖格式從 PNG 改為 JPG:一條終端指令搞定

編輯:XP 系統基礎知識

為什麼要修改截圖默認格式?

macOS 系統自帶的截圖功能默認保存為 PNG 格式,雖然無損畫質優異,但檔案體積較大,佔用存儲空間且分享傳輸較慢。對於頻繁截圖的用戶,改為 JPG 格式能顯著節省空間,且畫質對日常使用足夠。

Mac 常用截圖快捷鍵回顧

  • 全螢幕截圖:Command + Shift + 3 — 立即捕獲整個螢幕
  • 區域截圖:Command + Shift + 4 — 出現十字準星,拖選所需區域
  • 視窗截圖:Command + Shift + 4 後按 Space — 滑鼠變為相機圖標,點擊目標視窗

一鍵修改截圖默認格式為 JPG

方法:終端指令法(最快、最徹底)

  1. 打開「終端機」(應用程式 → 實用工具 → 終端機,或 Command + Space 搜索「Terminal」)
  2. 輸入以下指令並按回車:
defaults write com.apple.screencapture type jpg
  1. 為使設置立即生效,需重啟系統界面服務,輸入:
killall SystemUIServer

完成後,所有通過系統快捷鍵截取的圖片將自動保存為 JPG 格式。

常見問題與補充

如何恢復為 PNG 格式?

在終端執行:

defaults write com.apple.screencapture type png
killall SystemUIServer

支援哪些其他格式?

除 jpg 和 png 外,還支援 tiff、pdf、gif、bmp、pict、jp2、psd、sgi、tga 等格式,只需將指令中的 jpg 替換為目標格式縮寫即可。

修改後畫質如何控制?

JPG 預設壓縮品質約 80%。如需調整,可執行:

defaults write com.apple.screencapture quality 90
killall SystemUIServer

數值範圍 1-100,數值越大畫質越好、檔案越大。

截圖保存位置能否修改?

可以。例如改存到桌面「Screenshots」資料夾:

defaults write com.apple.screencapture location ~/Desktop/Screenshots
killall SystemUIServer

小結

一條 defaults write 指令即可永久修改 macOS 截圖默認格式,配合 killall SystemUIServer 即時生效,無需第三方工具,安全高效。建議根據使用習慣在 JPG(省空間)與 PNG(高畫質)間切換,或按需調整品質參數,打造最順手的截圖工作流。

Copyright © Windows教程網 All Rights Reserved