{"id":80,"date":"2012-01-02T02:07:13","date_gmt":"2012-01-02T10:07:13","guid":{"rendered":"http:\/\/h2plus.biz\/hiromitsu\/?p=80"},"modified":"2018-08-06T13:28:49","modified_gmt":"2018-08-06T20:28:49","slug":"%e3%83%87%e3%82%a3%e3%83%ac%e3%82%af%e3%83%88%e3%83%aa%e5%86%85%e3%81%ae%e5%86%99%e7%9c%9f%e3%82%92%e4%b8%80%e6%8b%ac%e7%b8%ae%e5%b0%8f%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/h2plus.biz\/hiromitsu\/entry\/80","title":{"rendered":"\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u5185\u306e\u5199\u771f\u3092\u4e00\u62ec\u7e2e\u5c0f\u3059\u308b"},"content":{"rendered":"<p>\u30c7\u30b8\u30ab\u30e1\u3067\u64ae\u3063\u305f\u5199\u771f\u3092\u30d6\u30ed\u30b0\u306a\u3069\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u5834\u5408\u306b\u3001\u9ad8\u89e3\u50cf\u5ea6\u304c\u3086\u3048\u306b\u30d5\u30a1\u30a4\u30eb\u30b5\u30a4\u30ba\u304c\u7121\u99c4\u306b\u30c7\u30ab\u304f\u3066\u3001\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u306b\u6642\u9593\u304c\u304b\u304b\u3063\u3066\u3057\u307e\u3063\u305f\u308a\u3001\u3042\u308b\u3044\u306f\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u53ef\u80fd\u306a\u30d5\u30a1\u30a4\u30eb\u30b5\u30a4\u30ba\u306e\u4e0a\u9650\u306b\u9054\u3057\u3066\u3057\u307e\u3063\u3066\u3001\u5199\u771f\u306e\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u304c\u3067\u304d\u306a\u304b\u3063\u305f\u308a\u3059\u308b\u3053\u3068\u304c\u3042\u308b\u3002\u3061\u306a\u307f\u306bWordPress\u306e3.1\u7cfb\u3067\u306f\u3001\u30d5\u30a1\u30a4\u30eb\u30b5\u30a4\u30ba\u306e\u4e0a\u9650\u304c2MB\u3068\u304b\u306a\u308a\u5c0f\u3055\u3081\u3002<\/p>\n<p><!--more--><br \/>\n\u59bb\u3082\u540c\u3058\u304fWordPress\u3092\u4f7f\u3063\u3066\u304a\u308a\u3001\u5199\u771f\u304c\u30e1\u30a4\u30f3\u306e\u30d6\u30ed\u30b0\u306a\u306e\u3067\u3001\u5199\u771f\u306e\u89e3\u50cf\u5ea6\u3092\u843d\u3068\u3059\u305f\u3081\u3060\u3051\u306b\u308f\u3056\u308f\u3056\u753b\u50cf\u7de8\u96c6\u30bd\u30d5\u30c8\u3092\u7acb\u3061\u4e0a\u3052\u308b\u306e\u306f\u9762\u5012\u3060\u3057\u3001\u4e00\u679a\u4e00\u679a\u306e\u5199\u771f\u3092GUI\u64cd\u4f5c\u3067\u30b5\u30a4\u30ba\u5909\u66f4\u3059\u308b\u306e\u3082\u82e6\u75db\u3060\u3002\u305d\u3053\u3067\u3001\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u5185\u306e\u5199\u771f\u3092\u4e00\u62ec\u3057\u3066\u7279\u5b9a\u306e\u30b5\u30a4\u30ba\u306b\u7e2e\u5c0f\u3059\u308b\u3088\u3046\u306a\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u66f8\u3044\u305f\u3002\u5f53\u521d\u306f\u307e\u3060\u59bb\u304cWindows\u3092\u4f7f\u3063\u3066\u3044\u305f\u306e\u3067VBScript\u3067\u5b9f\u88c5\u3002<code>identify<\/code>\u3001<code>convert<\/code>\u30b3\u30de\u30f3\u30c9\u304c\u4f7f\u3048\u308b\u3088\u3046\u306b\u3001\u3042\u3089\u304b\u3058\u3081<a href=\"https:\/\/www.imagemagick.org\/script\/download.php\">ImageMagick<\/a>\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304a\u304f\u3002<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">\r\nOption Explicit\r\n\r\nDim shell, dir, file, dimensions, size, width, height, maxsize, geometry\r\nsize = 1280\r\n\r\nSet shell = CreateObject(&amp;quot;WScript.Shell&amp;quot;)\r\nSet dir = shell.Exec(&amp;quot;cmd \/C dir \/B \/L *.jpg&amp;quot;)\r\n\r\nDo While Not dir.StdOut.AtEndOfStream\r\n\tfile = dir.StdOut.ReadLine\r\n\tSet dimensions = shell.Exec(&amp;quot;cmd \/C identify -format %G &amp;quot; &amp;amp; file)\r\n\tgeometry = Split(dimensions.StdOut.ReadLine, &amp;quot;x&amp;quot;)\r\n\twidth = CInt(geometry(0))\r\n\theight = CInt(geometry(1))\r\n\tIf width &amp;gt; height Then\r\n\t\tmaxsize = width\r\n\t\tgeometry = size &amp;amp; &amp;quot; &amp;quot;\r\n\tElse\r\n\t\tmaxsize = height\r\n\t\tgeometry = &amp;quot;x&amp;quot; &amp;amp; size &amp;amp; &amp;quot; &amp;quot;\r\n\tEnd If\r\n\r\n\tIf maxsize &amp;gt; size Then\r\n\t\tshell.Exec(&amp;quot;cmd \/C convert &amp;quot; &amp;amp; file &amp;amp; &amp;quot; -resize &amp;quot; &amp;amp; geometry &amp;amp; file)\r\n\tEnd If\r\nLoop\r\n<\/pre>\n<p>VBScript\u306a\u3093\u3066\u4f7f\u3063\u305f\u3053\u3068\u306a\u3044\u3082\u3093\u3060\u304b\u3089\u3001\u3053\u308c\u3060\u3051\u306e\u30b3\u30fc\u30c9\u66f8\u304f\u306e\u306b\u3048\u3089\u3044\u82e6\u52b4\u3057\u305f\u306e\u3092\u899a\u3048\u3066\u3044\u308b\u3002VBScript\u308f\u304b\u308a\u306b\u304f\u3044\u306a\u3002<\/p>\n<p><code>identify<\/code>\u30b3\u30de\u30f3\u30c9\u3067\u5404JPG\u30d5\u30a1\u30a4\u30eb\u306e\u30c7\u30a3\u30e1\u30f3\u30b8\u30e7\u30f3\u3092\u53d6\u5f97\u3057\u3066\u3001\u5e0c\u671b\u306e\u30b5\u30a4\u30ba\uff08size\u5909\u6570\u306e\u5024\uff1a1280px\uff09\u3088\u308a\u3082\u5927\u304d\u3044\u5834\u5408\u306b\u3060\u3051\u3001<code>convert<\/code>\u30b3\u30de\u30f3\u30c9\u3067\u7e2e\u5c0f\u3059\u308b\u3068\u3044\u3046\u3082\u306e\u3002<\/p>\n<p>\u30de\u30a4\u30d4\u30af\u30c1\u30e3\u914d\u4e0b\u306bBlogPhoto\u3068\u3044\u3046\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4f5c\u3063\u3066\u3001\u305d\u306e\u4e2d\u306b\u4e0a\u8a18\u30b9\u30af\u30ea\u30d7\u30c8\u3092ShrinkPhoto.vbs\u3068\u3057\u3066\u4fdd\u5b58\u3002\u30d6\u30ed\u30b0\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u305f\u3044\u5199\u771f\u306f\u3001\u3053\u306eBlogPhoto\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30b3\u30d4\u30fc\u3057\u3066\u3001ShrinkPhoto.vbs\u3092\u30c0\u30d6\u30eb\u30af\u30ea\u30c3\u30af\u3059\u308c\u3070OK\u3068\u3044\u3046\u6d41\u308c\u3002<br \/>\n<code>identify<\/code>\u3084<code>convert<\/code>\u304c\u5b9f\u884c\u3055\u308c\u308b\u5ea6\u306b\u3001\u3044\u3061\u3044\u3061\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u304c\u30dd\u30f3\u30dd\u30f3\u51fa\u3066\u304f\u308b\u306e\u304c\u975e\u5e38\u306b\u7169\u308f\u3057\u3044\u304c\u3001\u3068\u308a\u3042\u3048\u305a\u76ee\u7684\u306f\u9054\u6210\u3055\u308c\u308b\u306e\u3067\u3088\u3057\u3068\u3057\u3066\u305f\u3002\u4f55\u6c17\u306b\u81ea\u5206\u3082facebook\u306b\u5199\u771f\u3092\u30a2\u30c3\u30d7\u3059\u308b\u306e\u306b\u91cd\u5b9d\u3057\u3066\u305f\u3057\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001\u59bb\u304cWindows\u304b\u3089Mac\u306b\u4e57\u308a\u63db\u3048\u308b\u3053\u3068\u306b\u306a\u3063\u305f\u306e\u3067\u3001\u4eca\u5ea6\u306fbash\u3067\u540c\u3058\u51e6\u7406\u3092\u518d\u5b9f\u88c5\u3002ImageMagick\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306fport\u30b3\u30de\u30f3\u30c9\u4e00\u767a\u3067\u6e08\u3080\u306e\u3067\u3001Windows\u3088\u308a\u306f\u308b\u304b\u306b\u30e9\u30af\u3002<\/p>\n<pre>\n$ sudo port install ImageMagick\n<\/pre>\n<p>ShrinkPhoto\u306e\u30b3\u30fc\u30c9\u306f\u3053\u3093\u306a\u611f\u3058\u3002<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n#!\/bin\/bash\r\n\r\nSIZE=1280\r\ncd `dirname $0`\r\n\r\nfor f in `ls | grep -i '\\.jpg'`; do\r\n    dimensions=`identify -format %G $f`\r\n    width=`echo $dimensions | awk -Fx '{print $1}'`\r\n    height=`echo $dimensions | awk -Fx '{print $2}'`\r\n\r\n    if [ $width -gt $height ]; then\r\n        maxsize=$width\r\n        geometry=&amp;quot;$SIZE&amp;quot;\r\n    else\r\n        maxsize=$height\r\n        geometry=&amp;quot;x$SIZE&amp;quot;\r\n    fi\r\n\r\n    if [ $maxsize -gt $SIZE ]; then\r\n        convert $f -resize $geometry $f\r\n    fi\r\ndone\r\n<\/pre>\n<p>\u540c\u3058\u3088\u3046\u306b<code>~\/Pictures\/BlogPhoto<\/code>\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4f5c\u3063\u3066ShrinkPhoto\u3092\u5b9f\u884c\u6a29\u9650\u4ed8\u304d\u3067\u4fdd\u5b58\u3002\u5e0c\u671b\u306e\u7e2e\u5c0f\u30b5\u30a4\u30ba\u306fSIZE\u5909\u6570\u3067\u8abf\u6574\u3059\u308b\u3002<\/p>\n<p>Finder\u304b\u3089ShrinkPhoto\u3092\u8d77\u52d5\u3059\u308b\u3068\u3001\u30db\u30fc\u30e0\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\uff08<code>$HOME<\/code>\uff09\u304c\u30ab\u30ec\u30f3\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\uff08<code>$PWD<\/code>\uff09\u306b\u306a\u308b\u3088\u3046\u306a\u306e\u3067\u30014\u884c\u76ee\u306e<code>cd<\/code>\u304c\u306a\u3044\u3068\u3046\u307e\u304f\u52d5\u304b\u306a\u3044\u3002<\/p>\n<p><code>inotify<\/code>\u3092\u4f7f\u3048\u3070\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30d5\u30a1\u30a4\u30eb\u3092\u30b3\u30d4\u30fc\u3057\u305f\u6642\u70b9\u3067\u3001\u81ea\u52d5\u7684\u306b\u691c\u51fa\uff06\u7e2e\u5c0f\u306a\u3093\u3066\u3053\u3068\u3082\u3067\u304d\u308b\u3093\u3060\u308d\u3046\u3051\u3069\uff08<code>inotify<\/code>\u3063\u3066Linux\u3057\u304b\u306a\u3044\u3063\u3051\uff1f\uff09\u3001ShrinkPhoto\u3092\u30c0\u30d6\u30eb\u30af\u30ea\u30c3\u30af\u3059\u308b\u52b4\u529b\u3088\u308a\u3082\u3001\u306f\u308b\u304b\u306b\u5b9f\u88c5\u306e\u52b4\u529b\u304c\u4e0a\u307e\u308a\u305d\u3046\u3002\u76ee\u7684\u304c\u9054\u6210\u3055\u308c\u308b\u306e\u3067\u3053\u308c\u3067\u3088\u3057\u3068\u3057\u3066\u304a\u304f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30c7\u30b8\u30ab\u30e1\u3067\u64ae\u3063\u305f\u5199\u771f\u3092\u30d6\u30ed\u30b0\u306a\u3069\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u5834\u5408\u306b\u3001\u9ad8\u89e3\u50cf\u5ea6\u304c\u3086\u3048\u306b\u30d5\u30a1\u30a4\u30eb\u30b5\u30a4\u30ba\u304c\u7121\u99c4\u306b\u30c7\u30ab\u304f\u3066\u3001\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u306b\u6642\u9593\u304c\u304b\u304b\u3063\u3066\u3057\u307e\u3063\u305f\u308a\u3001\u3042\u308b\u3044\u306f\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u53ef\u80fd\u306a\u30d5\u30a1\u30a4\u30eb\u30b5\u30a4\u30ba\u306e\u4e0a\u9650\u306b\u9054\u3057\u3066\u3057\u307e\u3063\u3066\u3001\u5199\u771f\u306e\u30a2\u30c3 <a href='https:\/\/h2plus.biz\/hiromitsu\/entry\/80' class='excerpt-more'>[&#8230;]<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[37,26],"tags":[29,50,51,47,54,53,52],"_links":{"self":[{"href":"https:\/\/h2plus.biz\/hiromitsu\/wp-json\/wp\/v2\/posts\/80"}],"collection":[{"href":"https:\/\/h2plus.biz\/hiromitsu\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/h2plus.biz\/hiromitsu\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/h2plus.biz\/hiromitsu\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/h2plus.biz\/hiromitsu\/wp-json\/wp\/v2\/comments?post=80"}],"version-history":[{"count":1,"href":"https:\/\/h2plus.biz\/hiromitsu\/wp-json\/wp\/v2\/posts\/80\/revisions"}],"predecessor-version":[{"id":925,"href":"https:\/\/h2plus.biz\/hiromitsu\/wp-json\/wp\/v2\/posts\/80\/revisions\/925"}],"wp:attachment":[{"href":"https:\/\/h2plus.biz\/hiromitsu\/wp-json\/wp\/v2\/media?parent=80"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/h2plus.biz\/hiromitsu\/wp-json\/wp\/v2\/categories?post=80"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/h2plus.biz\/hiromitsu\/wp-json\/wp\/v2\/tags?post=80"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}