<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
> <channel><title>Random Musings&#187; web</title> <atom:link href="http://www.nslms.com/tag/web/feed/" rel="self" type="application/rss+xml" /><link>http://www.nslms.com</link> <description></description> <lastBuildDate>Wed, 06 Jul 2011 20:47:34 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3</generator> <item><title>Image thumbnail generating script</title><link>http://www.nslms.com/2008/02/20/image-thumbnail-generating-script/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rss</link> <comments>http://www.nslms.com/2008/02/20/image-thumbnail-generating-script/#comments</comments> <pubDate>Wed, 20 Feb 2008 21:24:00 +0000</pubDate> <dc:creator>RyanG</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[automation]]></category> <category><![CDATA[bash]]></category> <category><![CDATA[gallery]]></category> <category><![CDATA[linkedin]]></category> <category><![CDATA[thumbnail generation]]></category> <category><![CDATA[web]]></category> <guid
isPermaLink="false">http://www.nslms.com/2008/01/18/image-thumbnail-generating-script/</guid> <description><![CDATA[I have often wished that I could easily convert several images to a smaller size simultaneously. This is useful for batch resizing images for thumbnails, galleries, or use on the web. On a linux system with imageMagick installed, you can use the script at the end of this post to batch convert the images. I [...]]]></description> <content:encoded><![CDATA[<div
class="tweetmeme_button" style="float: right; margin-left: 10px;"> <a
href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.nslms.com%2F2008%2F02%2F20%2Fimage-thumbnail-generating-script%2F"><br
/> <img
src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.nslms.com%2F2008%2F02%2F20%2Fimage-thumbnail-generating-script%2F&amp;source=rjgeyer&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br
/> </a></div><p>I have often wished that I could easily convert several images to a smaller size simultaneously.  This is useful for batch resizing images for thumbnails, galleries, or use on the web.</p><p>On a linux system with imageMagick installed, you can use the script at the end of this post to batch convert the images.</p><p>I use it to create thumbnails and scaled images for my online <a
href="http://www.nslms.com/gallery">photo gallery</a> using the following commands.<br
/> ./imagethumbnail.sh &#8220;*.jpg&#8221; &#8220;800&#215;600&#8243; &#8220;web/&#8221;</p><p>./imagethumbnail.sh &#8220;*.jpg&#8221; &#8220;150&#215;112&#8243; &#8220;web/_thb_&#8221;</p><p>This creates a reasonable sized &#8220;large&#8221; image at 800&#215;600 and a thumbnail at 150&#215;112.  Makes managing new images in my gallery much easier.  Hopefully you&#8217;ll find it useful too.</p><p>Contents of imagethumbnail.sh</p><pre lang="bash">#!/bin/bash
SEARCH=$1
SIZE=$2
DEST=$3
if [ $# -lt 3 ]
then
echo "You must pass three arguments 1) The search string (usually *.jpg) 2) The destination size I.E. 500x374 3) The destination directory"
exit 1
fi
for i in $SEARCH
do
echo "Converting $i"
convert -resize $SIZE $i -resize $SIZE +profile '*' $DEST$i
done</pre><div
class="shr-bookmarks shr-bookmarks-center"><ul
class="socials"><li
class="shr-blogger"> <a
href="http://www.shareaholic.com/api/share/?title=Image+thumbnail+generating+script&amp;link=http://www.nslms.com/2008/02/20/image-thumbnail-generating-script/&amp;notes=I%20have%20often%20wished%20that%20I%20could%20easily%20convert%20several%20images%20to%20a%20smaller%20size%20simultaneously.%20%20This%20is%20useful%20for%20batch%20resizing%20images%20for%20thumbnails%2C%20galleries%2C%20or%20use%20on%20the%20web.%0D%0A%0D%0AOn%20a%20linux%20system%20with%20imageMagick%20installed%2C%20you%20can%20use%20the%20script%20at%20the%20end%20of%20this%20post%20to%20batch%20convert%20th&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=219&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Blog this on Blogger">Blog this on Blogger</a></li><li
class="shr-comfeed"> <a
href="http://www.nslms.com/2008/02/20/image-thumbnail-generating-script/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a></li><li
class="shr-facebook"> <a
href="http://www.shareaholic.com/api/share/?title=Image+thumbnail+generating+script&amp;link=http://www.nslms.com/2008/02/20/image-thumbnail-generating-script/&amp;notes=I%20have%20often%20wished%20that%20I%20could%20easily%20convert%20several%20images%20to%20a%20smaller%20size%20simultaneously.%20%20This%20is%20useful%20for%20batch%20resizing%20images%20for%20thumbnails%2C%20galleries%2C%20or%20use%20on%20the%20web.%0D%0A%0D%0AOn%20a%20linux%20system%20with%20imageMagick%20installed%2C%20you%20can%20use%20the%20script%20at%20the%20end%20of%20this%20post%20to%20batch%20convert%20th&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a></li><li
class="shr-linkedin"> <a
href="http://www.shareaholic.com/api/share/?title=Image+thumbnail+generating+script&amp;link=http://www.nslms.com/2008/02/20/image-thumbnail-generating-script/&amp;notes=I%20have%20often%20wished%20that%20I%20could%20easily%20convert%20several%20images%20to%20a%20smaller%20size%20simultaneously.%20%20This%20is%20useful%20for%20batch%20resizing%20images%20for%20thumbnails%2C%20galleries%2C%20or%20use%20on%20the%20web.%0D%0A%0D%0AOn%20a%20linux%20system%20with%20imageMagick%20installed%2C%20you%20can%20use%20the%20script%20at%20the%20end%20of%20this%20post%20to%20batch%20convert%20th&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=88&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a></li><li
class="shr-mail"> <a
href="http://www.shareaholic.com/api/share/?title=Image%20thumbnail%20generating%20script&amp;link=http://www.nslms.com/2008/02/20/image-thumbnail-generating-script/&amp;notes=I%20have%20often%20wished%20that%20I%20could%20easily%20convert%20several%20images%20to%20a%20smaller%20size%20simultaneously.%20%20This%20is%20useful%20for%20batch%20resizing%20images%20for%20thumbnails%2C%20galleries%2C%20or%20use%20on%20the%20web.%0D%0A%0D%0AOn%20a%20linux%20system%20with%20imageMagick%20installed%2C%20you%20can%20use%20the%20script%20at%20the%20end%20of%20this%20post%20to%20batch%20convert%20th&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=201&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a></li><li
class="shr-posterous"> <a
href="http://www.shareaholic.com/api/share/?title=Image+thumbnail+generating+script&amp;link=http://www.nslms.com/2008/02/20/image-thumbnail-generating-script/&amp;notes=I%20have%20often%20wished%20that%20I%20could%20easily%20convert%20several%20images%20to%20a%20smaller%20size%20simultaneously.%20%20This%20is%20useful%20for%20batch%20resizing%20images%20for%20thumbnails%2C%20galleries%2C%20or%20use%20on%20the%20web.%0D%0A%0D%0AOn%20a%20linux%20system%20with%20imageMagick%20installed%2C%20you%20can%20use%20the%20script%20at%20the%20end%20of%20this%20post%20to%20batch%20convert%20th&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=210&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post this to Posterous">Post this to Posterous</a></li><li
class="shr-twitter"> <a
href="http://www.shareaholic.com/api/share/?title=Image+thumbnail+generating+script&amp;link=http://www.nslms.com/2008/02/20/image-thumbnail-generating-script/&amp;notes=I%20have%20often%20wished%20that%20I%20could%20easily%20convert%20several%20images%20to%20a%20smaller%20size%20simultaneously.%20%20This%20is%20useful%20for%20batch%20resizing%20images%20for%20thumbnails%2C%20galleries%2C%20or%20use%20on%20the%20web.%0D%0A%0D%0AOn%20a%20linux%20system%20with%20imageMagick%20installed%2C%20you%20can%20use%20the%20script%20at%20the%20end%20of%20this%20post%20to%20batch%20convert%20th&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%2524%257Btitle%257D%2B-%2B%2524%257Bshort_link%257D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a></li><li
class="shr-digg"> <a
href="http://www.shareaholic.com/api/share/?title=Image+thumbnail+generating+script&amp;link=http://www.nslms.com/2008/02/20/image-thumbnail-generating-script/&amp;notes=I%20have%20often%20wished%20that%20I%20could%20easily%20convert%20several%20images%20to%20a%20smaller%20size%20simultaneously.%20%20This%20is%20useful%20for%20batch%20resizing%20images%20for%20thumbnails%2C%20galleries%2C%20or%20use%20on%20the%20web.%0D%0A%0D%0AOn%20a%20linux%20system%20with%20imageMagick%20installed%2C%20you%20can%20use%20the%20script%20at%20the%20end%20of%20this%20post%20to%20batch%20convert%20th&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=3&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Digg this!">Digg this!</a></li><li
class="shr-friendfeed"> <a
href="http://www.shareaholic.com/api/share/?title=Image+thumbnail+generating+script&amp;link=http://www.nslms.com/2008/02/20/image-thumbnail-generating-script/&amp;notes=I%20have%20often%20wished%20that%20I%20could%20easily%20convert%20several%20images%20to%20a%20smaller%20size%20simultaneously.%20%20This%20is%20useful%20for%20batch%20resizing%20images%20for%20thumbnails%2C%20galleries%2C%20or%20use%20on%20the%20web.%0D%0A%0D%0AOn%20a%20linux%20system%20with%20imageMagick%20installed%2C%20you%20can%20use%20the%20script%20at%20the%20end%20of%20this%20post%20to%20batch%20convert%20th&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=43&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on FriendFeed">Share this on FriendFeed</a></li><li
class="shr-googlereader"> <a
href="http://www.shareaholic.com/api/share/?title=Image+thumbnail+generating+script&amp;link=http://www.nslms.com/2008/02/20/image-thumbnail-generating-script/&amp;notes=I%20have%20often%20wished%20that%20I%20could%20easily%20convert%20several%20images%20to%20a%20smaller%20size%20simultaneously.%20%20This%20is%20useful%20for%20batch%20resizing%20images%20for%20thumbnails%2C%20galleries%2C%20or%20use%20on%20the%20web.%0D%0A%0D%0AOn%20a%20linux%20system%20with%20imageMagick%20installed%2C%20you%20can%20use%20the%20script%20at%20the%20end%20of%20this%20post%20to%20batch%20convert%20th&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=207&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a></li></ul><div
style="clear: both;"></div><div
class="shr-getshr" style="visibility:hidden;font-size:10px !important"><a
target="_blank" href="http://www.shareaholic.com/?src=pub">Get Shareaholic</a></div><div
style="clear: both;"></div></div> ]]></content:encoded> <wfw:commentRss>http://www.nslms.com/2008/02/20/image-thumbnail-generating-script/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> </channel> </rss>
