<?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/"
	xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
	xmlns:media="http://search.yahoo.com/mrss/"
>

<channel>
	<title>Albertux~# ./Blog &#187; image</title>
	<atom:link href="http://albertux.ayalasoft.com/es/tag/image/feed/" rel="self" type="application/rss+xml" />
	<link>http://albertux.ayalasoft.com</link>
	<description>61 20 64 65 76 65 6c 6f 70 65 72 20 6c 69 66 65</description>
	<lastBuildDate>Thu, 01 Jul 2010 16:23:33 +0000</lastBuildDate>
	<language>es</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<!-- podcast_generator="podPress/8.8" - maintenance_release="8.8.5.3" -->
	<copyright>2008 </copyright>
	<managingEditor>albertoi7@gmail.com (Albertux~# ./Blog)</managingEditor>
	<webMaster>albertoi7@gmail.com (Albertux~# ./Blog)</webMaster>
	<category>posts</category>
	<ttl>1440</ttl>
	<image>
		<url>http://ayalasoft.com/img/podcast02.jpg</url>
		<title>Albertux~# ./Blog &#187; image</title>
		<link>http://albertux.ayalasoft.com</link>
		<width>144</width>
		<height>144</height>
	</image>
	<itunes:subtitle></itunes:subtitle>
	<itunes:summary>After three days without programming, life becomes meaningless.</itunes:summary>
	<itunes:keywords></itunes:keywords>
	<itunes:category text="Technology">
		<itunes:category text="Software How-To" />
	</itunes:category>
	<itunes:category text="Technology">
		<itunes:category text="Podcasting" />
	</itunes:category>
	<itunes:author>Albertux~# ./Blog</itunes:author>
	<itunes:owner>
		<itunes:name>Albertux~# ./Blog</itunes:name>
		<itunes:email>albertoi7@gmail.com</itunes:email>
	</itunes:owner>
	<itunes:block>no</itunes:block>
	<itunes:explicit>no</itunes:explicit>
	<itunes:image href="http://ayalasoft.com/img/podcast01.jpg" />
		<item>
		<title>Resize Multiple Images</title>
		<link>http://albertux.ayalasoft.com/es/2008/10/20/resize-multiple-images/</link>
		<comments>http://albertux.ayalasoft.com/es/2008/10/20/resize-multiple-images/#comments</comments>
		<pubDate>Mon, 20 Oct 2008 23:44:14 +0000</pubDate>
		<dc:creator>albertux</dc:creator>
				<category><![CDATA[develop]]></category>
		<category><![CDATA[unix/linux]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[tool]]></category>

		<guid isPermaLink="false">http://albertux.ayalasoft.com/es/?p=755</guid>
		<description><![CDATA[Resize Multiple Images En mi caso tengo que cambir el tama&#241;o de mas de 1,000 fotografias asi que si utilizo gimp y las escalo cada una no es una buena soluci&#243;n. Necesitas ImageMagick y Bash. Subfolders: script.sh: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 #!/bin/bash [...]<p><a href="http://albertux.ayalasoft.com/es/2008/10/20/resize-multiple-images/">Resize Multiple Images</a> is a post from: <a href="http://albertux.ayalasoft.com">Albertux~# ./Blog</a></p>
]]></description>
			<content:encoded><![CDATA[<p><strong>Resize Multiple Images</strong></p>
<p>En mi caso tengo que cambir el tama&ntilde;o de mas de 1,000 fotografias asi que si utilizo <a href="http://gimp.org/" target="_blank">gimp</a> y las escalo cada una no es una buena soluci&oacute;n.</p>
<p>Necesitas <a href="http://www.imagemagick.org/" target="_blank">ImageMagick</a> y Bash.</p>
<p>Subfolders:<br />
<img src="http://ayalasoft.com/img/pictures_subfolders.jpg"></p>
<p>script.sh:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
<span style="color: #666666; font-style: italic;"># fotos</span>
<span style="color: #007800;">IFS</span>=$<span style="color: #ff0000;">'\t\n'</span>; <span style="color: #666666; font-style: italic;"># Algunas fotos puede que tengan espacios</span>
<span style="color: #000000; font-weight: bold;">for</span> i <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">ls</span><span style="color: #000000; font-weight: bold;">`</span>; <span style="color: #000000; font-weight: bold;">do</span>
    <span style="color: #000000; font-weight: bold;">for</span> j <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #007800;">$i</span> <span style="color: #000000; font-weight: bold;">`</span>; <span style="color: #000000; font-weight: bold;">do</span> <span style="color: #666666; font-style: italic;"># fotos/098-001/ fotos/098-002/ fotos/097-001/ etc...</span>
    <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$j</span>&quot;</span> = <span style="color: #ff0000;">&quot;Thumbs.db&quot;</span>  <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>  <span style="color: #666666; font-style: italic;"># garbage file on win32</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Nothing to do...&quot;</span>
    <span style="color: #000000; font-weight: bold;">elif</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$j</span>&quot;</span> = <span style="color: #ff0000;">&quot;script.sh&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span> <span style="color: #666666; font-style: italic;"># this script file :D</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Nothing to do...&quot;</span>
    <span style="color: #000000; font-weight: bold;">else</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Working ...&quot;</span> <span style="color: #666666; font-style: italic;"># do the job</span>
        <span style="color: #666666; font-style: italic;">#convert &quot;$i/$j&quot; -resize 500 &quot;$i/new_$j&quot;</span>
        <span style="color: #666666; font-style: italic;">#mv &quot;$i/new_$j&quot; &quot;$i/$j&quot;</span>
        mogrify <span style="color: #660033;">-resize</span> <span style="color: #000000;">500</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$i</span>/<span style="color: #007800;">$j</span>&quot;</span>
    <span style="color: #000000; font-weight: bold;">fi</span>
    <span style="color: #000000; font-weight: bold;">done</span>
<span style="color: #000000; font-weight: bold;">done</span></pre></td></tr></table></div>

<p>Ahora todas las imagenes tienen width: 500.</p>
<p>Ahora supongamos que se tienen multiples sub directorios, puedes utilizar este script:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
<span style="color: #007800;">IFS</span>=$<span style="color: #ff0000;">'\t\n'</span>
<span style="color: #007800;">EXTS</span>=<span style="color: #7a0874; font-weight: bold;">&#40;</span> jpg gif png JPG GIF PNG <span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #000000; font-weight: bold;">for</span> EXT <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #800000;">${EXTS[@]}</span>;
<span style="color: #000000; font-weight: bold;">do</span>
	<span style="color: #000000; font-weight: bold;">for</span> f <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">find</span> . <span style="color: #660033;">-name</span> <span style="color: #ff0000;">&quot;*.<span style="color: #007800;">$EXT</span>&quot;</span> <span style="color: #660033;">-type</span> f<span style="color: #000000; font-weight: bold;">`</span>;
	<span style="color: #000000; font-weight: bold;">do</span>
		<span style="color: #007800;"><span style="color: #c20cb9; font-weight: bold;">dir</span></span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">dirname</span> <span style="color: #007800;">$f</span><span style="color: #000000; font-weight: bold;">`</span>
		<span style="color: #007800;">ff</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">basename</span> <span style="color: #007800;">$f</span><span style="color: #000000; font-weight: bold;">`</span>
		<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Working ...&quot;</span>
		<span style="color: #666666; font-style: italic;">#convert &quot;$f&quot; -resize 500 &quot;$dir/new_$ff&quot;</span>
		<span style="color: #666666; font-style: italic;">#mv &quot;$dir/new_$ff&quot; &quot;$f&quot;</span>
                mogrify  <span style="color: #660033;">-resize</span> <span style="color: #000000;">500</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$f</span>&quot;</span>
	<span style="color: #000000; font-weight: bold;">done</span>
<span style="color: #000000; font-weight: bold;">done</span></pre></td></tr></table></div>

<p>[thanks for the advice CyX]</p>
<p><a href="http://albertux.ayalasoft.com/es/2008/10/20/resize-multiple-images/">Resize Multiple Images</a> is a post from: <a href="http://albertux.ayalasoft.com">Albertux~# ./Blog</a></p>
]]></content:encoded>
			<wfw:commentRss>http://albertux.ayalasoft.com/es/2008/10/20/resize-multiple-images/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
