<?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>BritishIdeas &#187; scripts</title>
	<atom:link href="http://www.britishideas.com/tag/scripts/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.britishideas.com</link>
	<description>Interesting Tech Projects</description>
	<lastBuildDate>Sun, 23 Oct 2011 20:05:43 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Resizing Images for Email in gThumb</title>
		<link>http://www.britishideas.com/2007/12/26/resizing-images-for-email-in-gthumb/</link>
		<comments>http://www.britishideas.com/2007/12/26/resizing-images-for-email-in-gthumb/#comments</comments>
		<pubDate>Wed, 26 Dec 2007 20:31:01 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[scripts]]></category>

		<guid isPermaLink="false">http://www.britishideas.com/2007/12/26/resizing-images-for-email-in-gthumb/</guid>
		<description><![CDATA[I wanted an easy way to resize images for email after importing them from a digital camera when using Gnome. Gnome by default uses gThumb for the import and it seems like an easy to use program. The problem is that in order to resize images several mouse clicks are needed, followed by a file]]></description>
			<content:encoded><![CDATA[<p>I wanted an easy way to resize images for email after importing them from a digital camera when using Gnome. Gnome by default uses gThumb for the import and it seems like an easy to use program. The problem is that in order to resize images several mouse clicks are needed, followed by a file rename.</p>
<p>So I wrote this quick little script to perform the resizing for me. Note that it only works with one picture at a time. To install copy to somewhere like /usr/share/scripts and make sure it is executable by everyone (<code>sudo chmod 755 /usr/share/scripts/resizeimage</code>). Then in gThumb go to the preferences and click on the Hotkeys tab. Add the following to one of the hotkeys (I used zero):</p>
<p><code>/usr/share/scripts/resizeimage %f %n %e</code></p>
<p>Then in gThumb select an image and press the hotkey (on the numeric keypad). The image will be resized and renamed in one step.</p>
<p>The script is written to resize the image so the longest side is 800 pixels, while maintaining the aspect ratio. You need to have ImageMagick installed. If the original image is called foo.jpg, then the resized image will be called foo.resized.jpg, just like the Nautilus Image Converter does.</p>
<p><code>#!/bin/bash<br />
# resizes an image for email, preserving aspect ratio<br />
# requires imagemagik<br />
# call: resizeimage /home/andy/foo.jpg /home/andy/foo .jpg<br />
# in gthumb: resizeimage %f %n %e</code></p>
<p><code>convert "$1" -resize "800x800&gt;" "$2.resized$3"</code></p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d53').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><strong><em>Bookmark to:</em></strong></a>
<br />
<div class="d53" style="overflow:hidden">
<br />
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d53').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;">Hide Sites</a>
</div>
</div>
<!-- Social Bookmarks END -->
<script type="text/javascript">$$('div.d53').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://www.britishideas.com/2007/12/26/resizing-images-for-email-in-gthumb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

