[sips]画像のパディング padToHeightWidth padColor
/usr/bin/sips --padToHeightWidth 720 1280 --padColor FFF000 --setProperty format png "/Library/User Pictures/Sports/Target.png" -o ~/Desktop/padToHeightWidth.png
ダウンロード - sips2padtoheightwidth.scpt.zip
#!/usr/bin/env osascript
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
#
#
#
#
# com.cocolog-nifty.quicktimer.icefloe
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
use AppleScript version "2.8"
use scripting additions
set aliasLocationPath to (path to desktop pictures folder from system domain)
set aliasImageFilePath to (choose file of type {"public.image", "public.tiff", "public.png", "public.jpeg", "com.adobe.photoshop-image", "public.heic"} with prompt "ファイルを選んで" default location aliasLocationPath without invisibles, showing package contents and multiple selections allowed)
set theImageFilePath to POSIX path of aliasImageFilePath as text
set numWidthPx to 1280 as number
set numHeightPx to 720 as number
####
set theCommandText to ("/usr/bin/sips --padToHeightWidth " & numHeightPx & " " & numWidthPx & " --padColor FFF000 \"" & theImageFilePath & "\" --setProperty format png -o ~/Desktop/padToHeightWidth.png") as text
log "theCommandText:" & theCommandText
do shell script theCommandText
return
| 固定リンク
「sips」カテゴリの記事
- [sips]カラー判定(2024.06.12)
- [SIPS]見開き画像を左右別ページにCROPする(2022.07.13)
- [sips]画像のリサンプル resampleHeightWidth resampleHeightWidthMax(2022.02.17)
- [sips]画像のCROP(2022.02.17)
- [sips]画像の操作 rotate flip horizontal flip vertical(2022.02.17)