{"id":1167,"date":"2022-12-04T00:13:20","date_gmt":"2022-12-03T15:13:20","guid":{"rendered":"https:\/\/ubun2m.com\/?p=1167"},"modified":"2022-12-04T00:13:57","modified_gmt":"2022-12-03T15:13:57","slug":"imagemagick%ef%bc%8bautomator%e3%81%a7%e7%94%bb%e5%83%8f%e5%90%88%e6%88%90%e3%81%ae%e3%82%b7%e3%83%a7%e3%83%bc%e3%83%88%e3%82%ab%e3%83%83%e3%83%88%e3%82%a2%e3%83%97%e3%83%aa%e3%82%92%e4%bd%9c%e3%82%8b","status":"publish","type":"post","link":"https:\/\/ubun2m.com\/?p=1167","title":{"rendered":"ImageMagick\uff0bAutomator\u3067\u753b\u50cf\u5408\u6210\u306e\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u30a2\u30d7\u30ea\u3092\u4f5c\u308b\u3010MacOS\u3011"},"content":{"rendered":"\n<p>\u30c7\u30b8\u30bf\u30eb\u753b\u50cf\u3092\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u304b\u3089\u7de8\u96c6\u3067\u304d\u308b\u30d5\u30ea\u30fc\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306e<a href=\"https:\/\/imagemagick.org\/script\/index.php\" target=\"_blank\" rel=\"noopener\" title=\"\">ImageMagick<\/a>\u3068\u3001Mac\u306eAutomator\u3092\u4f7f\u3063\u3066\u3001\u7c21\u5358\u306b\u753b\u50cf\u5408\u6210\u304c\u51fa\u6765\u308b\u3088\u3046\u306b\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u8907\u6570\u679a\u306e\u5199\u771f\u3092\u30c9\u30e9\u30c3\u30b0\uff06\u30c9\u30ed\u30c3\u30d7\u3057\u3066Automator\u3067\u4f5c\u6210\u3057\u305f\u30a2\u30d7\u30ea\u3092\u8d77\u52d5\u3055\u305b\u308b\u3060\u3051\u3067\u3001\u52a0\u7b97\u3001\u6bd4\u8f03\u660e\u5408\u6210\u3001\u6bd4\u8f03\u6697\u5408\u6210\u306e\uff13\u7a2e\u985e\u306e\u3046\u3061\uff11\u3064\u3092\u9078\u3093\u3067\u753b\u50cf\u5408\u6210\u304c\u3067\u304d\u308b\u3002<\/p>\n\n\n\n<p><strong>\uff1c\u6bd4\u8f03\u6697\u5408\u6210\u306e\u30b5\u30f3\u30d7\u30eb\uff1e<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large is-style-default\"><img decoding=\"async\" width=\"800\" height=\"600\" data-id=\"1176\" src=\"https:\/\/ubun2m.com\/wp-content\/uploads\/2022\/12\/IMG_7233-2-800x600.jpeg\" alt=\"\" class=\"wp-image-1176\" srcset=\"https:\/\/ubun2m.com\/wp-content\/uploads\/2022\/12\/IMG_7233-2-800x600.jpeg 800w, https:\/\/ubun2m.com\/wp-content\/uploads\/2022\/12\/IMG_7233-2-400x300.jpeg 400w, https:\/\/ubun2m.com\/wp-content\/uploads\/2022\/12\/IMG_7233-2-768x576.jpeg 768w, https:\/\/ubun2m.com\/wp-content\/uploads\/2022\/12\/IMG_7233-2-1536x1152.jpeg 1536w, https:\/\/ubun2m.com\/wp-content\/uploads\/2022\/12\/IMG_7233-2-1222x917.jpeg 1222w, https:\/\/ubun2m.com\/wp-content\/uploads\/2022\/12\/IMG_7233-2-922x692.jpeg 922w, https:\/\/ubun2m.com\/wp-content\/uploads\/2022\/12\/IMG_7233-2.jpeg 1920w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><figcaption class=\"wp-element-caption\">\u30d9\u30fc\u30b9\u5199\u771f\uff11\uff1aAirPods Max<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large is-style-default\"><img decoding=\"async\" width=\"800\" height=\"600\" data-id=\"1177\" src=\"https:\/\/ubun2m.com\/wp-content\/uploads\/2022\/12\/IMG_7059-2-800x600.jpeg\" alt=\"\" class=\"wp-image-1177\" srcset=\"https:\/\/ubun2m.com\/wp-content\/uploads\/2022\/12\/IMG_7059-2-800x600.jpeg 800w, https:\/\/ubun2m.com\/wp-content\/uploads\/2022\/12\/IMG_7059-2-400x300.jpeg 400w, https:\/\/ubun2m.com\/wp-content\/uploads\/2022\/12\/IMG_7059-2-768x576.jpeg 768w, https:\/\/ubun2m.com\/wp-content\/uploads\/2022\/12\/IMG_7059-2-1536x1152.jpeg 1536w, https:\/\/ubun2m.com\/wp-content\/uploads\/2022\/12\/IMG_7059-2-1222x917.jpeg 1222w, https:\/\/ubun2m.com\/wp-content\/uploads\/2022\/12\/IMG_7059-2-922x692.jpeg 922w, https:\/\/ubun2m.com\/wp-content\/uploads\/2022\/12\/IMG_7059-2.jpeg 1920w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><figcaption class=\"wp-element-caption\">\u30d9\u30fc\u30b9\u5199\u771f\uff12\uff1a\u829d\u751f\u3068\u843d\u3061\u8449<\/figcaption><\/figure>\n<\/figure>\n\n\n\n<figure class=\"wp-block-image size-large is-style-default\"><img decoding=\"async\" width=\"800\" height=\"600\" src=\"https:\/\/ubun2m.com\/wp-content\/uploads\/2022\/12\/output-2-800x600.jpg\" alt=\"\" class=\"wp-image-1178\" srcset=\"https:\/\/ubun2m.com\/wp-content\/uploads\/2022\/12\/output-2-800x600.jpg 800w, https:\/\/ubun2m.com\/wp-content\/uploads\/2022\/12\/output-2-400x300.jpg 400w, https:\/\/ubun2m.com\/wp-content\/uploads\/2022\/12\/output-2-768x576.jpg 768w, https:\/\/ubun2m.com\/wp-content\/uploads\/2022\/12\/output-2-1536x1152.jpg 1536w, https:\/\/ubun2m.com\/wp-content\/uploads\/2022\/12\/output-2-1222x917.jpg 1222w, https:\/\/ubun2m.com\/wp-content\/uploads\/2022\/12\/output-2-922x692.jpg 922w, https:\/\/ubun2m.com\/wp-content\/uploads\/2022\/12\/output-2.jpg 1920w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><figcaption class=\"wp-element-caption\">\u6bd4\u8f03\u6697\u5408\u6210\u5f8c\u306e\u5199\u771f<\/figcaption><\/figure>\n\n\n\n<p><strong>\uff1c\u4f5c\u308a\u65b9\uff1e<\/strong><\/p>\n\n\n\n<p>Automator\u3067Application\u3092\u4f5c\u6210\u3059\u308b\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-style-default\"><img decoding=\"async\" width=\"800\" height=\"712\" src=\"https:\/\/ubun2m.com\/wp-content\/uploads\/2022\/12\/Screenshot-2022-12-03-at-15.22.08-800x712.png\" alt=\"\" class=\"wp-image-1180\" srcset=\"https:\/\/ubun2m.com\/wp-content\/uploads\/2022\/12\/Screenshot-2022-12-03-at-15.22.08-800x712.png 800w, https:\/\/ubun2m.com\/wp-content\/uploads\/2022\/12\/Screenshot-2022-12-03-at-15.22.08-400x356.png 400w, https:\/\/ubun2m.com\/wp-content\/uploads\/2022\/12\/Screenshot-2022-12-03-at-15.22.08-768x684.png 768w, https:\/\/ubun2m.com\/wp-content\/uploads\/2022\/12\/Screenshot-2022-12-03-at-15.22.08-922x821.png 922w, https:\/\/ubun2m.com\/wp-content\/uploads\/2022\/12\/Screenshot-2022-12-03-at-15.22.08.png 1076w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p><strong>AppleScript<\/strong>\u3067\u753b\u50cf\u5408\u6210\u306e\u7a2e\u985e\u3092\u9078\u3076\u30c0\u30a4\u30a2\u30ed\u30b0\u3092\u8868\u793a\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u3001<strong>ShellScript<\/strong>\u3067ImageMagick\u306econvert\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u305d\u308c\u305e\u308c\u4f5c\u6210\u3059\u308b\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-style-default\"><img decoding=\"async\" width=\"800\" height=\"543\" src=\"https:\/\/ubun2m.com\/wp-content\/uploads\/2022\/12\/Screenshot-2022-12-03-at-15.16.29-800x543.jpg\" alt=\"\" class=\"wp-image-1171\" srcset=\"https:\/\/ubun2m.com\/wp-content\/uploads\/2022\/12\/Screenshot-2022-12-03-at-15.16.29-800x543.jpg 800w, https:\/\/ubun2m.com\/wp-content\/uploads\/2022\/12\/Screenshot-2022-12-03-at-15.16.29-400x271.jpg 400w, https:\/\/ubun2m.com\/wp-content\/uploads\/2022\/12\/Screenshot-2022-12-03-at-15.16.29-768x521.jpg 768w, https:\/\/ubun2m.com\/wp-content\/uploads\/2022\/12\/Screenshot-2022-12-03-at-15.16.29-1536x1042.jpg 1536w, https:\/\/ubun2m.com\/wp-content\/uploads\/2022\/12\/Screenshot-2022-12-03-at-15.16.29-1222x829.jpg 1222w, https:\/\/ubun2m.com\/wp-content\/uploads\/2022\/12\/Screenshot-2022-12-03-at-15.16.29-922x625.jpg 922w, https:\/\/ubun2m.com\/wp-content\/uploads\/2022\/12\/Screenshot-2022-12-03-at-15.16.29.jpg 1772w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p>AppleScript\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>on run argv\n\t\n\tset str to &quot;&quot;\n\tset ComposeChoices to {&quot;\u52a0\u7b97&quot;, &quot;\u6bd4\u8f03\u660e\u5408\u6210&quot;, &quot;\u6bd4\u8f03\u6697\u5408\u6210&quot;}\n\tset SelectedCompose to choose from list ComposeChoices with prompt &quot;\u5408\u6210\u65b9\u6cd5\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044:&quot; default items {&quot;\u6bd4\u8f03\u660e\u5408\u6210&quot;}\n\t\n\trepeat with arg in (item 1 of argv)\n\t\tset filePath to alias (arg as text)\n\t\tif filePath is not &quot;&quot; then\n\t\t\tset str to (str & &quot; &quot; & replaceText((convertPathToPOSIXString(filePath) as text), &quot; &quot;, &quot; &quot;)) & &quot;&quot;\n\t\t\t#\u30b9\u30da\u30fc\u30b9\u306eescape\u554f\u984c\u306f\u4fdd\u7559\u3002\n\t\tend if\n\tend repeat\n\tif str is not &quot;&quot; then\n\t\tif SelectedCompose is {&quot;\u52a0\u7b97&quot;} then\n\t\t\tset str to (str & &quot; -compose plus&quot;)\n\t\tend if\n\t\tif SelectedCompose is {&quot;\u6bd4\u8f03\u660e\u5408\u6210&quot;} then\n\t\t\tset str to (str & &quot; -compose lighten&quot;)\n\t\tend if\n\t\tif SelectedCompose is {&quot;\u6bd4\u8f03\u6697\u5408\u6210&quot;} then\n\t\t\tset str to (str & &quot; -compose darken&quot;)\n\t\tend if\n\t\t\n\t\tset str to (str & &quot; -background none -flatten output.jpg&quot;)\n\t\treturn str\n\tend if\nend run\n\n#https:\/\/developer.apple.com\/library\/archive\/documentation\/LanguagesUtilities\/Conceptual\/MacAutomationScriptingGuide\/ReferenceFilesandFolders.html\non convertPathToPOSIXString(thePath)\n\ttell application &quot;System Events&quot;\n\t\ttry\n\t\t\tset thePath to path of disk item (thePath as string)\n\t\ton error\n\t\t\tset thePath to path of thePath\n\t\tend try\n\tend tell\n\treturn POSIX path of thePath\nend convertPathToPOSIXString\n\n#http:\/\/tonbi.jp\/AppleScript\/Tips\/String\/FindReplace.html\non replaceText(theText, serchStr, replaceStr)\n\tset tmp to AppleScript&#39;s text item delimiters\n\tset AppleScript&#39;s text item delimiters to serchStr\n\tset theList to every text item of theText\n\tset AppleScript&#39;s text item delimiters to replaceStr\n\tset theText to theList as string\n\tset AppleScript&#39;s text item delimiters to tmp\n\treturn theText\nend replaceText<\/code><\/pre><\/div>\n\n\n\n<p>Shell Script\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>cd Desktop\/\n\n\/opt\/homebrew\/bin\/convert $@ <\/code><\/pre><\/div>\n\n\n\n<p>\u5f8c\u306f\u30a2\u30d7\u30ea\u306b\u540d\u524d\u3092\u3064\u3051\u3066\u4fdd\u5b58\u3057\u3066\u5b8c\u6210\u3002<br>\u4f7f\u3044\u65b9\u306f\u3001\u8907\u6570\u679a\u306e\u5199\u771f\u3092\u30c9\u30e9\u30c3\u30b0\uff06\u30c9\u30ed\u30c3\u30d7\u3057\u3066\u4f5c\u3063\u305f\u30a2\u30d7\u30ea\u306b\u91cd\u306d\u308b\u3060\u3051\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-style-default\"><img decoding=\"async\" width=\"354\" height=\"442\" src=\"https:\/\/ubun2m.com\/wp-content\/uploads\/2022\/12\/Screenshot-2022-12-03-at-15.25.55.jpg\" alt=\"\" class=\"wp-image-1181\" srcset=\"https:\/\/ubun2m.com\/wp-content\/uploads\/2022\/12\/Screenshot-2022-12-03-at-15.25.55.jpg 354w, https:\/\/ubun2m.com\/wp-content\/uploads\/2022\/12\/Screenshot-2022-12-03-at-15.25.55-320x400.jpg 320w\" sizes=\"(max-width: 354px) 100vw, 354px\" \/><figcaption class=\"wp-element-caption\">\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u753b\u9762<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full is-style-default\"><img decoding=\"async\" width=\"674\" height=\"388\" src=\"https:\/\/ubun2m.com\/wp-content\/uploads\/2022\/12\/Screenshot-2022-12-03-at-15.26.13.png\" alt=\"\" class=\"wp-image-1182\" srcset=\"https:\/\/ubun2m.com\/wp-content\/uploads\/2022\/12\/Screenshot-2022-12-03-at-15.26.13.png 674w, https:\/\/ubun2m.com\/wp-content\/uploads\/2022\/12\/Screenshot-2022-12-03-at-15.26.13-400x230.png 400w\" sizes=\"(max-width: 674px) 100vw, 674px\" \/><figcaption class=\"wp-element-caption\">\u5408\u6210\u65b9\u6cd5\u3092\u9078\u3076\u30c0\u30a4\u30a2\u30ed\u30b0<\/figcaption><\/figure>\n\n\n\n<p>\u9078\u629e\u3057\u305f\u65b9\u6cd5\u3067\u5408\u6210\u3055\u308c\u305f\u753b\u50cf\u304c\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u4e0a\u306boutput.jpg\u3068\u3057\u3066\u4fdd\u5b58\u3055\u308c\u308b\u3002<br><br><strong>\uff1c\u6539\u5584\u304c\u5fc5\u8981\u306a\u3053\u3068\uff1e<\/strong><br>\u30fb\u30d5\u30a1\u30a4\u30eb\u540d\u306b\u534a\u89d2\u30b9\u30da\u30fc\u30b9\u3092\u542b\u3080\u753b\u50cf\u3092\u4f7f\u3046\u3068\u30a8\u30e9\u30fc\u306b\u306a\u308b\u3002\"\"\u3068\u304b\\\\\u3067\u30a8\u30b9\u30b1\u30fc\u30d7\u3059\u308c\u3070\u826f\u3044\u306f\u305a\u3060\u304c\u3001\u4e0a\u624b\u304f\u3044\u304b\u305a\u672a\u89e3\u6c7a\u306e\u307e\u307e\u3002<br>\u30fb\u3082\u3063\u3068\u5b9f\u7528\u6027\u304c\u3042\u308b\u3082\u306e\u306b\u3059\u308b\u306b\u306f\u3001\u5199\u771f\u30b5\u30a4\u30ba\u3092\u81ea\u52d5\u3067\u540c\u3058\u30b5\u30a4\u30ba\u306b\u8abf\u6574\u3057\u305f\u308a\u3001\u5199\u771f\u306e\u5411\u304d\u3092\u63c3\u3048\u305f\u308a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002<\/p>\n\n\n\n<p><strong>\uff1c\u53c2\u8003HP\uff1e<\/strong><br>\u753b\u50cf\u5408\u6210 - \u30cb\u30b3\u30f3\u30aa\u30f3\u30e9\u30a4\u30f3\u30de\u30cb\u30e5\u30a2\u30eb<br><a href=\"https:\/\/onlinemanual.nikonimglib.com\/z5\/ja\/09_menu_guide_07_10.html\">https:\/\/onlinemanual.nikonimglib.com\/z5\/ja\/09_menu_guide_07_10.html<\/a><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30c7\u30b8\u30bf\u30eb\u753b\u50cf\u3092\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u304b\u3089\u7de8\u96c6\u3067\u304d\u308b\u30d5\u30ea\u30fc\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306eImageMagick\u3068\u3001Mac\u306eAutomator\u3092\u4f7f\u3063\u3066\u3001\u7c21\u5358\u306b\u753b\u50cf\u5408\u6210\u304c\u51fa\u6765\u308b\u3088\u3046\u306b\u3057\u305f\u3002 \u8907\u6570\u679a\u306e\u5199\u771f\u3092\u30c9\u30e9\u30c3\u30b0\uff06\u30c9\u30ed\u30c3\u30d7\u3057\u3066Automator\u3067\u4f5c\u6210 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1186,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[3,17],"tags":[],"class_list":["post-1167","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-3","category-17"],"acf":[],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/ubun2m.com\/wp-content\/uploads\/2022\/12\/output-2-1.jpg","_links":{"self":[{"href":"https:\/\/ubun2m.com\/index.php?rest_route=\/wp\/v2\/posts\/1167","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubun2m.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubun2m.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubun2m.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubun2m.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1167"}],"version-history":[{"count":0,"href":"https:\/\/ubun2m.com\/index.php?rest_route=\/wp\/v2\/posts\/1167\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ubun2m.com\/index.php?rest_route=\/wp\/v2\/media\/1186"}],"wp:attachment":[{"href":"https:\/\/ubun2m.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1167"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubun2m.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1167"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubun2m.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1167"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}