<?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/"
		>
<channel>
	<title>Comments on: UIImage fix</title>
	<atom:link href="http://blog.logichigh.com/2008/06/05/uiimage-fix/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.logichigh.com/2008/06/05/uiimage-fix/</link>
	<description>Logic High Software Blog</description>
	<lastBuildDate>Fri, 03 Feb 2012 17:46:35 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>By: Mick</title>
		<link>http://blog.logichigh.com/2008/06/05/uiimage-fix/comment-page-1/#comment-1164</link>
		<dc:creator>Mick</dc:creator>
		<pubDate>Sun, 16 Oct 2011 01:18:37 +0000</pubDate>
		<guid isPermaLink="false">http://badpirate.wordpress.com/?p=49#comment-1164</guid>
		<description>Hooray!!  I did get this code to work but I guessed my way through it.  Still don&#039;t understand it but maybe I will.  Thanks  so much for the code!!</description>
		<content:encoded><![CDATA[<p>Hooray!!  I did get this code to work but I guessed my way through it.  Still don&#8217;t understand it but maybe I will.  Thanks  so much for the code!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mick</title>
		<link>http://blog.logichigh.com/2008/06/05/uiimage-fix/comment-page-1/#comment-1163</link>
		<dc:creator>Mick</dc:creator>
		<pubDate>Sun, 09 Oct 2011 21:10:03 +0000</pubDate>
		<guid isPermaLink="false">http://badpirate.wordpress.com/?p=49#comment-1163</guid>
		<description>This code is way over my head.
I Really Really need to figure out how to use it.
In my app I am attaching a saved image to an email body so I don&#039;t have a UIImage to manipulate. I only specify a path to the image in the documents directory, pull it into NSData and attach it as a mime type.jpg. It works great but there again the image is turned left 90deg when the  recipient views the email. Does anyone have a snippet of code that will help me understand how to get the saves image into UIImage so I can expose it to this function? 
Thanks for the code though. Once I grasp this my app is gonna rock big time!</description>
		<content:encoded><![CDATA[<p>This code is way over my head.<br />
I Really Really need to figure out how to use it.<br />
In my app I am attaching a saved image to an email body so I don&#8217;t have a UIImage to manipulate. I only specify a path to the image in the documents directory, pull it into NSData and attach it as a mime type.jpg. It works great but there again the image is turned left 90deg when the  recipient views the email. Does anyone have a snippet of code that will help me understand how to get the saves image into UIImage so I can expose it to this function?<br />
Thanks for the code though. Once I grasp this my app is gonna rock big time!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter M</title>
		<link>http://blog.logichigh.com/2008/06/05/uiimage-fix/comment-page-1/#comment-1162</link>
		<dc:creator>Peter M</dc:creator>
		<pubDate>Sun, 09 Oct 2011 17:46:14 +0000</pubDate>
		<guid isPermaLink="false">http://badpirate.wordpress.com/?p=49#comment-1162</guid>
		<description>Saved me from my ignorance of image formats...THANKS for your excellent code that just WORKED first time out of the gate!</description>
		<content:encoded><![CDATA[<p>Saved me from my ignorance of image formats&#8230;THANKS for your excellent code that just WORKED first time out of the gate!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marco Gerardo</title>
		<link>http://blog.logichigh.com/2008/06/05/uiimage-fix/comment-page-1/#comment-1135</link>
		<dc:creator>Marco Gerardo</dc:creator>
		<pubDate>Fri, 12 Aug 2011 01:53:44 +0000</pubDate>
		<guid isPermaLink="false">http://badpirate.wordpress.com/?p=49#comment-1135</guid>
		<description>YOU ARE THE BEST! Thank you for the code!</description>
		<content:encoded><![CDATA[<p>YOU ARE THE BEST! Thank you for the code!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: anthony blake</title>
		<link>http://blog.logichigh.com/2008/06/05/uiimage-fix/comment-page-1/#comment-1045</link>
		<dc:creator>anthony blake</dc:creator>
		<pubDate>Tue, 19 Jul 2011 15:14:55 +0000</pubDate>
		<guid isPermaLink="false">http://badpirate.wordpress.com/?p=49#comment-1045</guid>
		<description>Fixed my orientation and image resolution issues in one method. Thank you, great work.</description>
		<content:encoded><![CDATA[<p>Fixed my orientation and image resolution issues in one method. Thank you, great work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: iPhone &#8211; UIImage rotation fix &#124; Advanced App Development</title>
		<link>http://blog.logichigh.com/2008/06/05/uiimage-fix/comment-page-1/#comment-923</link>
		<dc:creator>iPhone &#8211; UIImage rotation fix &#124; Advanced App Development</dc:creator>
		<pubDate>Mon, 13 Jun 2011 20:17:26 +0000</pubDate>
		<guid isPermaLink="false">http://badpirate.wordpress.com/?p=49#comment-923</guid>
		<description>[...] UIImage fix [...]</description>
		<content:encoded><![CDATA[<p>[...] UIImage fix [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin Lohman</title>
		<link>http://blog.logichigh.com/2008/06/05/uiimage-fix/comment-page-1/#comment-912</link>
		<dc:creator>Kevin Lohman</dc:creator>
		<pubDate>Tue, 24 May 2011 17:39:33 +0000</pubDate>
		<guid isPermaLink="false">http://badpirate.wordpress.com/?p=49#comment-912</guid>
		<description>Neil - Use 3.2 :)</description>
		<content:encoded><![CDATA[<p>Neil &#8211; Use 3.2 <img src='http://blog.logichigh.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: neil</title>
		<link>http://blog.logichigh.com/2008/06/05/uiimage-fix/comment-page-1/#comment-911</link>
		<dc:creator>neil</dc:creator>
		<pubDate>Tue, 24 May 2011 08:59:29 +0000</pubDate>
		<guid isPermaLink="false">http://badpirate.wordpress.com/?p=49#comment-911</guid>
		<description>Thanks for sharing this code, i works on iOS4 but not on iOS3.1 : i have a &quot;EXC_BAD_ACCESS&quot; for the line : 
&quot;CGContextDrawImage(UIGraphicsGetCurrentContext(), CGRectMake(0, 0, width, height), imgRef);&quot;

How can i fix it ? Please</description>
		<content:encoded><![CDATA[<p>Thanks for sharing this code, i works on iOS4 but not on iOS3.1 : i have a &#8220;EXC_BAD_ACCESS&#8221; for the line :<br />
&#8220;CGContextDrawImage(UIGraphicsGetCurrentContext(), CGRectMake(0, 0, width, height), imgRef);&#8221;</p>
<p>How can i fix it ? Please</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stas Dmitrenko</title>
		<link>http://blog.logichigh.com/2008/06/05/uiimage-fix/comment-page-1/#comment-891</link>
		<dc:creator>Stas Dmitrenko</dc:creator>
		<pubDate>Thu, 31 Mar 2011 21:14:37 +0000</pubDate>
		<guid isPermaLink="false">http://badpirate.wordpress.com/?p=49#comment-891</guid>
		<description>Thank you soooooo much!!!!!!!!!!!!!!!!!!!!!!!!!!!!!</description>
		<content:encoded><![CDATA[<p>Thank you soooooo much!!!!!!!!!!!!!!!!!!!!!!!!!!!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott</title>
		<link>http://blog.logichigh.com/2008/06/05/uiimage-fix/comment-page-1/#comment-747</link>
		<dc:creator>Scott</dc:creator>
		<pubDate>Tue, 30 Nov 2010 05:09:23 +0000</pubDate>
		<guid isPermaLink="false">http://badpirate.wordpress.com/?p=49#comment-747</guid>
		<description>Thanks for this!

One small thing to add.  A small bug in this code, when you&#039;re calculating the bounds near the top of this method, you&#039;ll need to take the floor of the result after calculating in the ratio.  If you do not do this, it&#039;ll be rounded up to the next integer and leave a white strip on the right or bottom edge.  So, just change it to this to fix it:

       if (ratio &gt; 1) {  
            bounds.size.width = kMaxResolution;  
            bounds.size.height = floor(bounds.size.width / ratio);  
        }  
        else {  
            bounds.size.height = kMaxResolution;  
            bounds.size.width = floor(bounds.size.height * ratio);  
        }</description>
		<content:encoded><![CDATA[<p>Thanks for this!</p>
<p>One small thing to add.  A small bug in this code, when you&#8217;re calculating the bounds near the top of this method, you&#8217;ll need to take the floor of the result after calculating in the ratio.  If you do not do this, it&#8217;ll be rounded up to the next integer and leave a white strip on the right or bottom edge.  So, just change it to this to fix it:</p>
<p>       if (ratio &gt; 1) {<br />
            bounds.size.width = kMaxResolution;<br />
            bounds.size.height = floor(bounds.size.width / ratio);<br />
        }<br />
        else {<br />
            bounds.size.height = kMaxResolution;<br />
            bounds.size.width = floor(bounds.size.height * ratio);<br />
        }</p>
]]></content:encoded>
	</item>
</channel>
</rss>

