<?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>LogikDevelopment &#187; ImageMagick</title>
	<atom:link href="http://www.logikdev.com/tag/imagemagick/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.logikdev.com</link>
	<description>&#34;Il n&#039;y a pas de problème, il n&#039;y a que des solutions. L&#039;esprit de l&#039;homme invente ensuite le problème.&#34; André Gide</description>
	<lastBuildDate>Tue, 20 Dec 2011 12:25:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Image manipulation in VBScript</title>
		<link>http://www.logikdev.com/2010/06/09/image-manipulation-in-vbscript/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=image-manipulation-in-vbscript</link>
		<comments>http://www.logikdev.com/2010/06/09/image-manipulation-in-vbscript/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 21:35:57 +0000</pubDate>
		<dc:creator>smoreau</dc:creator>
				<category><![CDATA[VBScript]]></category>
		<category><![CDATA[ImageMagick]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.logikdev.com/?p=572</guid>
		<description><![CDATA[I am back on Windows development. It is not what I prefer but still, it is development so I am right here! My task was to upload an image from a website (nothing difficult there) but the application has to resize and crop the uploaded image before saving it on the hard drive in order [...]]]></description>
			<content:encoded><![CDATA[<p>I am back on Windows development. It is not what I prefer but still, it is development so I am right here! <img src='http://www.logikdev.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>My task was to upload an image from a website (nothing difficult there) but the application has to resize and crop the uploaded image before saving it on the hard drive in order to save space.<br />
Oh, and I forgot to mention that the website is built in VBScript (it would have been too easy if it has been built in ASP.Net&#8230;). <img src='http://www.logikdev.com/wp-includes/images/smilies/icon_rolleyes.gif' alt=':roll:' class='wp-smiley' /> </p>
<p>I went across a lot of image management libraries which work with VBScript during my search:</p>
<ul>
<li><strong>AspImage</strong> from <a href="http://serverobjects.com/">ServerObjects Inc</a>;</li>
<li><strong>ImageGlue</strong> from <a href="http://www.websupergoo.com/">webSupergoo</a>;</li>
<li><strong>Active Image Processing Component</strong> from <a href="http://www.ultrashareware.com/">Ultra Shareware</a>.</li>
</ul>
<p>But I must admit that the most difficult part of this task was to find a good and FREE library.<br />
The one I finally picked is <a href="http://www.imagemagick.org/"><strong>ImageMagick</strong></a>.</p>
<p>Once the library is installed (click <a href="http://www.imagemagick.org/script/binary-releases.php#windows">here</a> to go to the download page), you can use the following code to resize the image to a maximum of 800 pixels and crop the white space around it:</p>
<pre class="brush: vb; title: ; notranslate">
Dim imageMagick
Set imageMagick = CreateObject(&quot;ImageMagickObject.MagickImage.1&quot;)

imageMagick.Convert &quot;C:/testimage.jpg&quot;, &quot;-fuzz&quot;, &quot;10%&quot;, &quot;-trim&quot;, &quot;-resize&quot;, &quot;800x800&gt;&quot;, &quot;C:/thumb-testimage.jpg&quot;
</pre>
<p>Obviously, this tool can do much more than that, but this will be subject of another topic.<br />
Or you can simply read the documentation: <a href="http://www.imagemagick.org/Usage/">http://www.imagemagick.org/Usage/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.logikdev.com/2010/06/09/image-manipulation-in-vbscript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

