{"id":391,"date":"2012-06-06T05:15:36","date_gmt":"2012-06-06T11:15:36","guid":{"rendered":"http:\/\/rrbits.com\/epb\/?p=391"},"modified":"2012-06-06T11:35:40","modified_gmt":"2012-06-06T17:35:40","slug":"rounded-corner-script","status":"publish","type":"post","link":"https:\/\/rrbits.com\/epb\/2012\/06\/06\/rounded-corner-script\/","title":{"rendered":"Rounded Corner Script"},"content":{"rendered":"<p>Script Download: <a href=\"https:\/\/rrbits.com\/rounded_corner_2.zip\">rounded_corner.sh (v2)<\/a><\/p>\n<p>Ever wanted a script that would round the corners of images for you?\u00a0 Well, if you said yes, I wrote myself a bash script to do just that.\u00a0 As of this post it can do the following: round of corners of images and it can also add a glass-bubble effect as described in the ImageMagick tutorials.\u00a0 You can specify the border radius and a background color, which is handy if you are making JPEGs.\u00a0 The script&#8217;s help screen is shown below, as well as a couple of samples.\u00a0 Radius sizes are in pixels.<\/p>\n<pre>.\/rounded_corner.sh &lt;inputfile&gt; &lt;outputfile&gt; [options]\r\n\u00a0 -m\u00a0\u00a0 Method [plain or glass-bubble]\r\n\u00a0 -r\u00a0\u00a0 Corner Radius\r\n\u00a0 -b\u00a0\u00a0 Background Color\r\nMethod can be plain or glass-bubble at the moment. (default: plain)\r\nRadius specifies the radius of the rounded corners. (default: 15)\r\n\r\nNote: This should be able to function as filter command, so if you wanted\r\nrounded thumbnails of a particular size you can:\r\nconvert &lt;bigfile&gt; -resize 200x200 png:- | .\/rounded_corner.sh png:- smallrounded.png\" 1&gt;&amp;2<\/pre>\n\n\t\t<style type=\"text\/css\">\n\t\t\t#gallery-1 {\n\t\t\t\tmargin: auto;\n\t\t\t}\n\t\t\t#gallery-1 .gallery-item {\n\t\t\t\tfloat: left;\n\t\t\t\tmargin-top: 10px;\n\t\t\t\ttext-align: center;\n\t\t\t\twidth: 25%;\n\t\t\t}\n\t\t\t#gallery-1 img {\n\t\t\t\tborder: 2px solid #cfcfcf;\n\t\t\t}\n\t\t\t#gallery-1 .gallery-caption {\n\t\t\t\tmargin-left: 0;\n\t\t\t}\n\t\t\t\/* see gallery_shortcode() in wp-includes\/media.php *\/\n\t\t<\/style>\n\t\t<div id='gallery-1' class='gallery galleryid-391 gallery-columns-4 gallery-size-thumbnail'><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon portrait'>\n\t\t\t\t<a href='https:\/\/rrbits.com\/epb\/files\/2012\/06\/no_plain_wbg_sample.jpg'><img loading=\"lazy\" decoding=\"async\" width=\"91\" height=\"128\" src=\"https:\/\/rrbits.com\/epb\/files\/2012\/06\/no_plain_wbg_sample.jpg\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" aria-describedby=\"gallery-1-392\" \/><\/a>\n\t\t\t<\/dt>\n\t\t\t\t<dd class='wp-caption-text gallery-caption' id='gallery-1-392'>\n\t\t\t\tPlain Method, Solid Background\n\t\t\t\t<\/dd><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon portrait'>\n\t\t\t\t<a href='https:\/\/rrbits.com\/epb\/files\/2012\/06\/no_glass_wbg_sample.png'><img loading=\"lazy\" decoding=\"async\" width=\"92\" height=\"129\" src=\"https:\/\/rrbits.com\/epb\/files\/2012\/06\/no_glass_wbg_sample.png\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" aria-describedby=\"gallery-1-393\" \/><\/a>\n\t\t\t<\/dt>\n\t\t\t\t<dd class='wp-caption-text gallery-caption' id='gallery-1-393'>\n\t\t\t\tGlass-Bubble Method, Solid Background\n\t\t\t\t<\/dd><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon portrait'>\n\t\t\t\t<a href='https:\/\/rrbits.com\/epb\/files\/2012\/06\/no_glass_bg_sample.png'><img loading=\"lazy\" decoding=\"async\" width=\"92\" height=\"129\" src=\"https:\/\/rrbits.com\/epb\/files\/2012\/06\/no_glass_bg_sample.png\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" aria-describedby=\"gallery-1-394\" \/><\/a>\n\t\t\t<\/dt>\n\t\t\t\t<dd class='wp-caption-text gallery-caption' id='gallery-1-394'>\n\t\t\t\tGlass-Bubble Method, No Background\n\t\t\t\t<\/dd><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon portrait'>\n\t\t\t\t<a href='https:\/\/rrbits.com\/epb\/files\/2012\/06\/no_plain_bg_sample.png'><img loading=\"lazy\" decoding=\"async\" width=\"91\" height=\"128\" src=\"https:\/\/rrbits.com\/epb\/files\/2012\/06\/no_plain_bg_sample.png\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" aria-describedby=\"gallery-1-395\" \/><\/a>\n\t\t\t<\/dt>\n\t\t\t\t<dd class='wp-caption-text gallery-caption' id='gallery-1-395'>\n\t\t\t\tPlain Method, No Background\n\t\t\t\t<\/dd><\/dl><br style=\"clear: both\" \/>\n\t\t<\/div>\n\n","protected":false},"excerpt":{"rendered":"<p>Script Download: rounded_corner.sh (v2) Ever wanted a script that would round the corners of images for you?\u00a0 Well, if you said yes, I wrote myself a bash script to do just that.\u00a0 As of this post it can do the following: round of corners of images and it can also add a glass-bubble effect as&#8230;  <a class=\"excerpt-read-more\" href=\"https:\/\/rrbits.com\/epb\/2012\/06\/06\/rounded-corner-script\/\" title=\"ReadRounded Corner Script\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[42,3999,3],"tags":[4243,4006,3997],"class_list":["post-391","post","type-post","status-publish","format-standard","hentry","category-linux","category-programming","category-small-project","tag-image-manipulation","tag-imagemagick","tag-problem"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/rrbits.com\/epb\/wp-json\/wp\/v2\/posts\/391","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rrbits.com\/epb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rrbits.com\/epb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rrbits.com\/epb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rrbits.com\/epb\/wp-json\/wp\/v2\/comments?post=391"}],"version-history":[{"count":4,"href":"https:\/\/rrbits.com\/epb\/wp-json\/wp\/v2\/posts\/391\/revisions"}],"predecessor-version":[{"id":399,"href":"https:\/\/rrbits.com\/epb\/wp-json\/wp\/v2\/posts\/391\/revisions\/399"}],"wp:attachment":[{"href":"https:\/\/rrbits.com\/epb\/wp-json\/wp\/v2\/media?parent=391"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rrbits.com\/epb\/wp-json\/wp\/v2\/categories?post=391"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rrbits.com\/epb\/wp-json\/wp\/v2\/tags?post=391"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}