<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Resizing Images in AppleScript/Automator</title>
	<atom:link href="http://schinckel.net/2006/03/04/resizing-images-in-applescriptautomator/feed/" rel="self" type="application/rss+xml" />
	<link>http://schinckel.net/2006/03/04/resizing-images-in-applescriptautomator/</link>
	<description>Like a fortune cookie, only without the fortune, and not a cookie.</description>
	<pubDate>Mon, 22 Mar 2010 07:24:32 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.5</generator>
		<item>
		<title>By: Bruno</title>
		<link>http://schinckel.net/2006/03/04/resizing-images-in-applescriptautomator/#comment-1614</link>
		<dc:creator>Bruno</dc:creator>
		<pubDate>Wed, 06 Jun 2007 21:56:24 +0000</pubDate>
		<guid isPermaLink="false">http://schinckel.blogsome.com/2006/03/04/resizing-images-in-applescriptautomator/#comment-1614</guid>
		<description>Hi!

I did it but ... maybe to late for you.

Script code:

&lt;code&gt;global theImage

-- Prompt the user to select a file
set theImage to choose file with prompt "Please select an image file:" without invisibles
-- Prompt the user to enter the width of the picture
set theResult to display dialog "Saisissez la largeur de l'image." default answer "640"
set theAnswer to text returned of theResult

-- Retrieve the resize percentage amount
set theNewWidth to theAnswer as integer

-- Determine a path in which to save the resized image
tell application "Finder"
	set theImageName to name of theImage
	set theImageFolder to (folder of theImage) as string
end tell
set theResizedImagePath to theImageFolder &#38; "Resized-" &#38; theImageName as string

-- Open the image, resize it, and save it as a new file
tell application "Image Events"
	launch
	set theImage to open theImage
	
	-- This is the tricky part: you need to keep the ratio of the original picture
	copy dimensions of theImage to {currentWidth, currentHeight}
	set ratio to theNewWidth / currentWidth
	
	tell theImage
		scale by factor ratio to size theNewWidth
		save in theResizedImagePath
		close
	end tell
end tell&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Hi!</p>
<p>I did it but &#8230; maybe to late for you.</p>
<p>Script code:</p>
<p><code>global theImage</p>
<p>-- Prompt the user to select a file<br />
set theImage to choose file with prompt "Please select an image file:" without invisibles<br />
-- Prompt the user to enter the width of the picture<br />
set theResult to display dialog "Saisissez la largeur de l'image." default answer "640"<br />
set theAnswer to text returned of theResult</p>
<p>-- Retrieve the resize percentage amount<br />
set theNewWidth to theAnswer as integer</p>
<p>-- Determine a path in which to save the resized image<br />
tell application "Finder"<br />
	set theImageName to name of theImage<br />
	set theImageFolder to (folder of theImage) as string<br />
end tell<br />
set theResizedImagePath to theImageFolder &amp; "Resized-" &amp; theImageName as string</p>
<p>-- Open the image, resize it, and save it as a new file<br />
tell application "Image Events"<br />
	launch<br />
	set theImage to open theImage</p>
<p>	-- This is the tricky part: you need to keep the ratio of the original picture<br />
	copy dimensions of theImage to {currentWidth, currentHeight}<br />
	set ratio to theNewWidth / currentWidth</p>
<p>	tell theImage<br />
		scale by factor ratio to size theNewWidth<br />
		save in theResizedImagePath<br />
		close<br />
	end tell<br />
end tell</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthew Schinckel</title>
		<link>http://schinckel.net/2006/03/04/resizing-images-in-applescriptautomator/#comment-1499</link>
		<dc:creator>Matthew Schinckel</dc:creator>
		<pubDate>Thu, 08 Feb 2007 04:18:05 +0000</pubDate>
		<guid isPermaLink="false">http://schinckel.blogsome.com/2006/03/04/resizing-images-in-applescriptautomator/#comment-1499</guid>
		<description>You could use an external program to shrink them.  I don't use the system outlined above, as I don't post that many images.

What I do use is something called PNG Compress (or similar) to shrink PNG images.  JPGs I generally will process with Photoshop/ImageReady.

It would be good to see how small a file Lightroom makes.  You can, after all, generate a whole Web Gallery from that, and can export just one image if you prefer.</description>
		<content:encoded><![CDATA[<p>You could use an external program to shrink them.  I don&#8217;t use the system outlined above, as I don&#8217;t post that many images.</p>
<p>What I do use is something called PNG Compress (or similar) to shrink PNG images.  JPGs I generally will process with Photoshop/ImageReady.</p>
<p>It would be good to see how small a file Lightroom makes.  You can, after all, generate a whole Web Gallery from that, and can export just one image if you prefer.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hrududu</title>
		<link>http://schinckel.net/2006/03/04/resizing-images-in-applescriptautomator/#comment-1498</link>
		<dc:creator>Hrududu</dc:creator>
		<pubDate>Mon, 05 Feb 2007 08:30:54 +0000</pubDate>
		<guid isPermaLink="false">http://schinckel.blogsome.com/2006/03/04/resizing-images-in-applescriptautomator/#comment-1498</guid>
		<description>The downside is the resultant resized images are not compressed enough and are still way too large (in file size) than they would be had I resized them with an external application.

I use Resize! to batch resize AND compress images. Apple seems to have forgotten the compression side of things.

Still, I use Automator regularly for other stuff and it really is a cool way to get dross things done.

:) </description>
		<content:encoded><![CDATA[<p>The downside is the resultant resized images are not compressed enough and are still way too large (in file size) than they would be had I resized them with an external application.</p>
<p>I use Resize! to batch resize AND compress images. Apple seems to have forgotten the compression side of things.</p>
<p>Still, I use Automator regularly for other stuff and it really is a cool way to get dross things done.</p>
<p> <img src='http://schinckel.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
</channel>
</rss>
