<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Customizing WordPress images</title>
	<atom:link href="http://ottopress.com/2011/customizing-wordpress-images/feed/" rel="self" type="application/rss+xml" />
	<link>http://ottopress.com/2011/customizing-wordpress-images/</link>
	<description>You have to use an Ottopress to get fresh squeezed Otto.</description>
	<lastBuildDate>Wed, 22 May 2013 11:11:27 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.6-beta3-24284</generator>
	<item>
		<title>By: lellobot</title>
		<link>http://ottopress.com/2011/customizing-wordpress-images/comment-page-1/#comment-11430</link>
		<dc:creator>lellobot</dc:creator>
		<pubDate>Thu, 22 Nov 2012 21:37:59 +0000</pubDate>
		<guid isPermaLink="false">http://ottopress.com/?p=621#comment-11430</guid>
		<description><![CDATA[This did the trick for me. Thanks for posting!]]></description>
		<content:encoded><![CDATA[<p>This did the trick for me. Thanks for posting!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: arash</title>
		<link>http://ottopress.com/2011/customizing-wordpress-images/comment-page-1/#comment-11374</link>
		<dc:creator>arash</dc:creator>
		<pubDate>Mon, 12 Nov 2012 05:50:28 +0000</pubDate>
		<guid isPermaLink="false">http://ottopress.com/?p=621#comment-11374</guid>
		<description><![CDATA[thanks a lot for the code
i have a question. is it possible to apply b&amp;w only for post thumbs and not the original image?
thank you again]]></description>
		<content:encoded><![CDATA[<p>thanks a lot for the code<br />
i have a question. is it possible to apply b&amp;w only for post thumbs and not the original image?<br />
thank you again</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Otto</title>
		<link>http://ottopress.com/2011/customizing-wordpress-images/comment-page-1/#comment-11249</link>
		<dc:creator>Otto</dc:creator>
		<pubDate>Fri, 21 Sep 2012 16:06:56 +0000</pubDate>
		<guid isPermaLink="false">http://ottopress.com/?p=621#comment-11249</guid>
		<description><![CDATA[Sure, but you would have to write your own code for that.]]></description>
		<content:encoded><![CDATA[<p>Sure, but you would have to write your own code for that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pedro</title>
		<link>http://ottopress.com/2011/customizing-wordpress-images/comment-page-1/#comment-11248</link>
		<dc:creator>Pedro</dc:creator>
		<pubDate>Fri, 21 Sep 2012 15:45:24 +0000</pubDate>
		<guid isPermaLink="false">http://ottopress.com/?p=621#comment-11248</guid>
		<description><![CDATA[Hi Otto,
Great stuff! but is it possible to apply a filter to an image url directly instead of applying it to an image when your uploading it.
I have a file upload field and a select list and would like to give the user the option of what filter to use.

something like &lt;strong&gt;&lt;/strong&gt; which would output a new url for the new manipulated image file.

Thanks!]]></description>
		<content:encoded><![CDATA[<p>Hi Otto,<br />
Great stuff! but is it possible to apply a filter to an image url directly instead of applying it to an image when your uploading it.<br />
I have a file upload field and a select list and would like to give the user the option of what filter to use.</p>
<p>something like <strong></strong> which would output a new url for the new manipulated image file.</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Spike</title>
		<link>http://ottopress.com/2011/customizing-wordpress-images/comment-page-1/#comment-11229</link>
		<dc:creator>Spike</dc:creator>
		<pubDate>Wed, 12 Sep 2012 10:51:44 +0000</pubDate>
		<guid isPermaLink="false">http://ottopress.com/?p=621#comment-11229</guid>
		<description><![CDATA[Hi Otto

Thank you for this, it&#039;s fantastic creating a b/w thumbnail for me.  However I&#039;m having trouble with watermarking the full colour images.  All plugins I have tried removed the b/w filter when you run the plugin.  I cannot stop this from happening and I cannot figure out a way to automate adding a watermark using the function.php and there is no documentation online on how to do this with Wordpress...

Do you have any ideas how to do this?  

Thanks!]]></description>
		<content:encoded><![CDATA[<p>Hi Otto</p>
<p>Thank you for this, it&#8217;s fantastic creating a b/w thumbnail for me.  However I&#8217;m having trouble with watermarking the full colour images.  All plugins I have tried removed the b/w filter when you run the plugin.  I cannot stop this from happening and I cannot figure out a way to automate adding a watermark using the function.php and there is no documentation online on how to do this with WordPress&#8230;</p>
<p>Do you have any ideas how to do this?  </p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: WP Featured Image http ottopress com 2011 customizing&#8230; &#171; Riz Notes</title>
		<link>http://ottopress.com/2011/customizing-wordpress-images/comment-page-1/#comment-11020</link>
		<dc:creator>WP Featured Image http ottopress com 2011 customizing&#8230; &#171; Riz Notes</dc:creator>
		<pubDate>Mon, 02 Jul 2012 10:56:57 +0000</pubDate>
		<guid isPermaLink="false">http://ottopress.com/?p=621#comment-11020</guid>
		<description><![CDATA[[...] http://ottopress.com/2011/customizing-wordpress-images/ [...]]]></description>
		<content:encoded><![CDATA[<p>[...] <a href="http://ottopress.com/2011/customizing-wordpress-images/" rel="nofollow">http://ottopress.com/2011/customizing-wordpress-images/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: How to Grayscale Images in WordPress</title>
		<link>http://ottopress.com/2011/customizing-wordpress-images/comment-page-1/#comment-10991</link>
		<dc:creator>How to Grayscale Images in WordPress</dc:creator>
		<pubDate>Fri, 22 Jun 2012 14:18:07 +0000</pubDate>
		<guid isPermaLink="false">http://ottopress.com/?p=621#comment-10991</guid>
		<description><![CDATA[[...] credits for this awesome trick goes to Otto. This post is presented by the leader in printing services, Next Day Flyers. As the name indicates [...]]]></description>
		<content:encoded><![CDATA[<p>[...] credits for this awesome trick goes to Otto. This post is presented by the leader in printing services, Next Day Flyers. As the name indicates [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bill Erickson</title>
		<link>http://ottopress.com/2011/customizing-wordpress-images/comment-page-1/#comment-10976</link>
		<dc:creator>Bill Erickson</dc:creator>
		<pubDate>Tue, 19 Jun 2012 02:56:51 +0000</pubDate>
		<guid isPermaLink="false">http://ottopress.com/?p=621#comment-10976</guid>
		<description><![CDATA[Thanks for this. It came in handy on a recent project.

I was having issues with it at first. The issue I had was if you uploaded an image smaller than the image size, you would get an error (undefined index). So I added a conditional to check if that image size was available, and if it wasn&#039;t it used the original image: https://gist.github.com/2952049]]></description>
		<content:encoded><![CDATA[<p>Thanks for this. It came in handy on a recent project.</p>
<p>I was having issues with it at first. The issue I had was if you uploaded an image smaller than the image size, you would get an error (undefined index). So I added a conditional to check if that image size was available, and if it wasn&#8217;t it used the original image: <a href="https://gist.github.com/2952049" rel="nofollow">https://gist.github.com/2952049</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hwdesign</title>
		<link>http://ottopress.com/2011/customizing-wordpress-images/comment-page-1/#comment-10893</link>
		<dc:creator>hwdesign</dc:creator>
		<pubDate>Fri, 01 Jun 2012 22:34:38 +0000</pubDate>
		<guid isPermaLink="false">http://ottopress.com/?p=621#comment-10893</guid>
		<description><![CDATA[I fixed it by doing this:

&lt;code&gt;
function bw_filter($meta) {
    $path = wp_upload_dir();
    /* get dirname of file to get correct date folder */
    $subdir = trailingslashit(dirname($meta[&#039;file&#039;]));
    /* get basedir on path to get uploads folder */
    $file = trailingslashit($path[&#039;basedir&#039;]).$subdir.$meta[&#039;sizes&#039;][&#039;bw-image&#039;][&#039;file&#039;];
    list($orig_w, $orig_h, $orig_type) = @getimagesize($file);
    $image = wp_load_image($file);
    imagefilter($image, IMG_FILTER_GRAYSCALE);
	switch ($orig_type) {
		case IMAGETYPE_GIF:
			imagegif( $image, $file );
			break;
		case IMAGETYPE_PNG:
			imagepng( $image, $file );
			break;
		case IMAGETYPE_JPEG:
			imagejpeg( $image, $file );
			break;
	}
	return $meta;
}

add_filter(&#039;wp_generate_attachment_metadata&#039;,&#039;bw_filter&#039;);
&lt;/code&gt;]]></description>
		<content:encoded><![CDATA[<p>I fixed it by doing this:</p>
<p><code><br />
function bw_filter($meta) {<br />
    $path = wp_upload_dir();<br />
    /* get dirname of file to get correct date folder */<br />
    $subdir = trailingslashit(dirname($meta['file']));<br />
    /* get basedir on path to get uploads folder */<br />
    $file = trailingslashit($path['basedir']).$subdir.$meta['sizes']['bw-image']['file'];<br />
    list($orig_w, $orig_h, $orig_type) = @getimagesize($file);<br />
    $image = wp_load_image($file);<br />
    imagefilter($image, IMG_FILTER_GRAYSCALE);<br />
	switch ($orig_type) {<br />
		case IMAGETYPE_GIF:<br />
			imagegif( $image, $file );<br />
			break;<br />
		case IMAGETYPE_PNG:<br />
			imagepng( $image, $file );<br />
			break;<br />
		case IMAGETYPE_JPEG:<br />
			imagejpeg( $image, $file );<br />
			break;<br />
	}<br />
	return $meta;<br />
}</p>
<p>add_filter('wp_generate_attachment_metadata','bw_filter');<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hwdesign</title>
		<link>http://ottopress.com/2011/customizing-wordpress-images/comment-page-1/#comment-10892</link>
		<dc:creator>hwdesign</dc:creator>
		<pubDate>Fri, 01 Jun 2012 20:16:15 +0000</pubDate>
		<guid isPermaLink="false">http://ottopress.com/?p=621#comment-10892</guid>
		<description><![CDATA[I&#039;m getting the same error:

&lt;code&gt;Warning: imagefilter() expects parameter 1 to be resource, string given&lt;/code&gt;

But I&#039;m getting it because the Page that I&#039;m uploading the image to was published last month, and wp_upload_dir() returns the current month&#039;s upload path, so it looks like the image doesn&#039;t exist.

Any suggestions on how I might go about fixing this? I&#039;d love to be able to generate b/w thumbs for both posts and pages, regardless of when they were published.

Thanks!]]></description>
		<content:encoded><![CDATA[<p>I&#8217;m getting the same error:</p>
<p><code>Warning: imagefilter() expects parameter 1 to be resource, string given</code></p>
<p>But I&#8217;m getting it because the Page that I&#8217;m uploading the image to was published last month, and wp_upload_dir() returns the current month&#8217;s upload path, so it looks like the image doesn&#8217;t exist.</p>
<p>Any suggestions on how I might go about fixing this? I&#8217;d love to be able to generate b/w thumbs for both posts and pages, regardless of when they were published.</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Object Caching 418/454 objects using xcache

 Served from: ottodestruct.com @ 2013-05-22 06:54:12 by W3 Total Cache -->