<?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: Scaling images and creating thumbnails from UIViews</title>
	<atom:link href="http://www.icab.de/blog/2010/10/01/scaling-images-and-creating-thumbnails-from-uiviews/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.icab.de/blog/2010/10/01/scaling-images-and-creating-thumbnails-from-uiviews/</link>
	<description>iCab related stuff; Mac, iPhone and Cocoa programming</description>
	<lastBuildDate>Sat, 25 May 2013 06:41:13 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>By: Kris</title>
		<link>http://www.icab.de/blog/2010/10/01/scaling-images-and-creating-thumbnails-from-uiviews/comment-page-1/#comment-26228</link>
		<dc:creator>Kris</dc:creator>
		<pubDate>Mon, 23 Apr 2012 10:16:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=174#comment-26228</guid>
		<description><![CDATA[I figured it out. I just had to [viewImage drawInRect:CGRectMake(-18,-199,851,363)];

I set them to negative values, and it worked fine, and set the size to be the exact size of the view I&#039;m copying.]]></description>
		<content:encoded><![CDATA[<p>I figured it out. I just had to [viewImage drawInRect:CGRectMake(-18,-199,851,363)];</p>
<p>I set them to negative values, and it worked fine, and set the size to be the exact size of the view I&#8217;m copying.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kris</title>
		<link>http://www.icab.de/blog/2010/10/01/scaling-images-and-creating-thumbnails-from-uiviews/comment-page-1/#comment-26227</link>
		<dc:creator>Kris</dc:creator>
		<pubDate>Mon, 23 Apr 2012 09:21:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=174#comment-26227</guid>
		<description><![CDATA[Any tip on how to just copy a part of the UIView? say from CGRectMake(18, 199, 180, 160)

So basically from the original UIView, I want to move 18 pixels to the right, and 199 pixels down and copy from there. 

I need it, so I can save to photo album.

I&#039;ve been searching and no answer to this anywhere online. 

Thanks in advance.]]></description>
		<content:encoded><![CDATA[<p>Any tip on how to just copy a part of the UIView? say from CGRectMake(18, 199, 180, 160)</p>
<p>So basically from the original UIView, I want to move 18 pixels to the right, and 199 pixels down and copy from there. </p>
<p>I need it, so I can save to photo album.</p>
<p>I&#8217;ve been searching and no answer to this anywhere online. </p>
<p>Thanks in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alexander</title>
		<link>http://www.icab.de/blog/2010/10/01/scaling-images-and-creating-thumbnails-from-uiviews/comment-page-1/#comment-24005</link>
		<dc:creator>Alexander</dc:creator>
		<pubDate>Thu, 22 Mar 2012 20:44:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=174#comment-24005</guid>
		<description><![CDATA[@Dave
Yes, you&#039;re right. Thanks for pointing this out.

In my own Apps I also have to use a scale of 1 on devices with Retina display sometimes, so I did use the scaling of 1 or 2 explicitly. And I&#039;ve totally forgotten that there&#039;s also the value 0... ;-)]]></description>
		<content:encoded><![CDATA[<p>@Dave<br />
Yes, you&#8217;re right. Thanks for pointing this out.</p>
<p>In my own Apps I also have to use a scale of 1 on devices with Retina display sometimes, so I did use the scaling of 1 or 2 explicitly. And I&#8217;ve totally forgotten that there&#8217;s also the value 0&#8230; <img src='http://www.icab.de/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://www.icab.de/blog/2010/10/01/scaling-images-and-creating-thumbnails-from-uiviews/comment-page-1/#comment-23895</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Wed, 21 Mar 2012 22:24:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=174#comment-23895</guid>
		<description><![CDATA[Note: If you use 0 for the scale in UIGraphicsBeginImageContextWithOptions(), the scale factor is set to the scale factor of the device’s main screen. You don&#039;t have to do the check yourself.]]></description>
		<content:encoded><![CDATA[<p>Note: If you use 0 for the scale in UIGraphicsBeginImageContextWithOptions(), the scale factor is set to the scale factor of the device’s main screen. You don&#8217;t have to do the check yourself.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alexander</title>
		<link>http://www.icab.de/blog/2010/10/01/scaling-images-and-creating-thumbnails-from-uiviews/comment-page-1/#comment-22211</link>
		<dc:creator>Alexander</dc:creator>
		<pubDate>Wed, 07 Mar 2012 17:43:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=174#comment-22211</guid>
		<description><![CDATA[@Abhijit Sathe
I think, if your problem is that only the visible part of the image is copied and you can&#039;t make the source big enough so that it can be copied in one step, then you need to copy the whole image step by step. You create the image context of the required size and then scroll source view to the first  &quot;tile&quot;, then draw it to the correct location within the destination image context and then scroll to the next tile and draw it as well, etc.

But be careful with the memory requirement of really large views. Images can consume much memory (usually 4 Bytes per Pixel: RGB and Alpha). So creating images of views that are much larger than the screen can be a problem on some devices.]]></description>
		<content:encoded><![CDATA[<p>@Abhijit Sathe<br />
I think, if your problem is that only the visible part of the image is copied and you can&#8217;t make the source big enough so that it can be copied in one step, then you need to copy the whole image step by step. You create the image context of the required size and then scroll source view to the first  &#8220;tile&#8221;, then draw it to the correct location within the destination image context and then scroll to the next tile and draw it as well, etc.</p>
<p>But be careful with the memory requirement of really large views. Images can consume much memory (usually 4 Bytes per Pixel: RGB and Alpha). So creating images of views that are much larger than the screen can be a problem on some devices.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Abhijit Sathe</title>
		<link>http://www.icab.de/blog/2010/10/01/scaling-images-and-creating-thumbnails-from-uiviews/comment-page-1/#comment-22185</link>
		<dc:creator>Abhijit Sathe</dc:creator>
		<pubDate>Wed, 07 Mar 2012 13:02:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=174#comment-22185</guid>
		<description><![CDATA[Hi, This is a very good post.
But my problem is something with offscreen content. I have a UIScrollview It has a large uiImage view on it . So, at start the image view is displaying 200,200 size so the part of large image i.e 200,200 is rendered :( and i want the whole image to be rendered so can you please help me on this i have searched but not getting help on rendering content i.e not viewable or displayed on screen
Thanks Please Reply...]]></description>
		<content:encoded><![CDATA[<p>Hi, This is a very good post.<br />
But my problem is something with offscreen content. I have a UIScrollview It has a large uiImage view on it . So, at start the image view is displaying 200,200 size so the part of large image i.e 200,200 is rendered <img src='http://www.icab.de/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  and i want the whole image to be rendered so can you please help me on this i have searched but not getting help on rendering content i.e not viewable or displayed on screen<br />
Thanks Please Reply&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alexander</title>
		<link>http://www.icab.de/blog/2010/10/01/scaling-images-and-creating-thumbnails-from-uiviews/comment-page-1/#comment-20443</link>
		<dc:creator>Alexander</dc:creator>
		<pubDate>Thu, 26 Jan 2012 15:15:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=174#comment-20443</guid>
		<description><![CDATA[@nemo
There&#039;s definitely no 22MB limit for iOS Apps. iOS Apps can get much more memory, if available.

But please note that the main memory of an iOS device will be shared by all running Apps, background tasks and the iOS itself. And there&#039;s no such thing as a swap file, like on normal computers, where the disk space can be used to get more memory.

And there&#039;s never something like  &quot;nothing is running&quot;. The iOS is always running, so the system is always  using memory for screen buffers, background tasks like the audio player, network stuff, many system tasks etc. 

On devices with only 256 MB or even only 128 MB (the very first iPhone and iPod Touch models), your App might only have 22 MB memory left for your Apps data, all the rest can be used by the iOS and the application code of the App itself. 

But because of the serious memory limits, you have to be very careful with your own memory management. Make sure that you release the memory you don&#039;t need anymore as early as possible, especially if you might need a lot of temporary memory while processing data in a loop.]]></description>
		<content:encoded><![CDATA[<p>@nemo<br />
There&#8217;s definitely no 22MB limit for iOS Apps. iOS Apps can get much more memory, if available.</p>
<p>But please note that the main memory of an iOS device will be shared by all running Apps, background tasks and the iOS itself. And there&#8217;s no such thing as a swap file, like on normal computers, where the disk space can be used to get more memory.</p>
<p>And there&#8217;s never something like  &#8220;nothing is running&#8221;. The iOS is always running, so the system is always  using memory for screen buffers, background tasks like the audio player, network stuff, many system tasks etc. </p>
<p>On devices with only 256 MB or even only 128 MB (the very first iPhone and iPod Touch models), your App might only have 22 MB memory left for your Apps data, all the rest can be used by the iOS and the application code of the App itself. </p>
<p>But because of the serious memory limits, you have to be very careful with your own memory management. Make sure that you release the memory you don&#8217;t need anymore as early as possible, especially if you might need a lot of temporary memory while processing data in a loop.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nemo</title>
		<link>http://www.icab.de/blog/2010/10/01/scaling-images-and-creating-thumbnails-from-uiviews/comment-page-1/#comment-20441</link>
		<dc:creator>nemo</dc:creator>
		<pubDate>Thu, 26 Jan 2012 14:12:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=174#comment-20441</guid>
		<description><![CDATA[&quot;This is not a big deal for the iPhone 4 which has much more main memory (512 MB) than all other devices.&quot;

Are you sure?  I have just got bit by a 22MB limit for running app within iOS.
When this limit is reached, iOS just kills the app if it won&#039;t release mem.
And I got e.g. iPad2 with 256MB with nothing else running on it so there&#039;s lot&#039;s of free mem...
Of course it is not officially documented, just try it :)
Another &#039;feature&#039; from Apple...]]></description>
		<content:encoded><![CDATA[<p>&#8220;This is not a big deal for the iPhone 4 which has much more main memory (512 MB) than all other devices.&#8221;</p>
<p>Are you sure?  I have just got bit by a 22MB limit for running app within iOS.<br />
When this limit is reached, iOS just kills the app if it won&#8217;t release mem.<br />
And I got e.g. iPad2 with 256MB with nothing else running on it so there&#8217;s lot&#8217;s of free mem&#8230;<br />
Of course it is not officially documented, just try it <img src='http://www.icab.de/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Another &#8216;feature&#8217; from Apple&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alexander</title>
		<link>http://www.icab.de/blog/2010/10/01/scaling-images-and-creating-thumbnails-from-uiviews/comment-page-1/#comment-4959</link>
		<dc:creator>Alexander</dc:creator>
		<pubDate>Mon, 25 Oct 2010 13:39:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=174#comment-4959</guid>
		<description><![CDATA[@Carlos
You should check your code again. This should work on the hardware as well just like it does work in the simulator.]]></description>
		<content:encoded><![CDATA[<p>@Carlos<br />
You should check your code again. This should work on the hardware as well just like it does work in the simulator.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carlos</title>
		<link>http://www.icab.de/blog/2010/10/01/scaling-images-and-creating-thumbnails-from-uiviews/comment-page-1/#comment-4957</link>
		<dc:creator>Carlos</dc:creator>
		<pubDate>Mon, 25 Oct 2010 12:49:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=174#comment-4957</guid>
		<description><![CDATA[I&#039;m trying to load a https webpage using a self-signed certificate inside an UIWebView, but haven&#039;t been able to find how, I always get error -1201 (untrusted server certificate). After searching and trying different solutions for hours I got it working on the simulator (using allowsAnyHTTPSCertificateForHost), but doesn&#039;t work on hardware, and I have read this method is not approved by Apple. Could you give me any advice on this?

I know this is not very related to the current post, but it&#039;s driving me crazy and I&#039;ve seen you have it implemented on iCab (great app by the way).

Thanks.]]></description>
		<content:encoded><![CDATA[<p>I&#8217;m trying to load a https webpage using a self-signed certificate inside an UIWebView, but haven&#8217;t been able to find how, I always get error -1201 (untrusted server certificate). After searching and trying different solutions for hours I got it working on the simulator (using allowsAnyHTTPSCertificateForHost), but doesn&#8217;t work on hardware, and I have read this method is not approved by Apple. Could you give me any advice on this?</p>
<p>I know this is not very related to the current post, but it&#8217;s driving me crazy and I&#8217;ve seen you have it implemented on iCab (great app by the way).</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian</title>
		<link>http://www.icab.de/blog/2010/10/01/scaling-images-and-creating-thumbnails-from-uiviews/comment-page-1/#comment-4730</link>
		<dc:creator>Brian</dc:creator>
		<pubDate>Sun, 17 Oct 2010 02:56:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=174#comment-4730</guid>
		<description><![CDATA[Ah, makes sense. Thanks.]]></description>
		<content:encoded><![CDATA[<p>Ah, makes sense. Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alexander</title>
		<link>http://www.icab.de/blog/2010/10/01/scaling-images-and-creating-thumbnails-from-uiviews/comment-page-1/#comment-4660</link>
		<dc:creator>Alexander</dc:creator>
		<pubDate>Tue, 12 Oct 2010 20:55:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=174#comment-4660</guid>
		<description><![CDATA[@Brian
Hidden views won&#039;t draw, so I make them visible before drawing them. But because a new image context is created before doing this, all drawing takes place in this image context. So nothing is visible on screen, don&#039;t worry.]]></description>
		<content:encoded><![CDATA[<p>@Brian<br />
Hidden views won&#8217;t draw, so I make them visible before drawing them. But because a new image context is created before doing this, all drawing takes place in this image context. So nothing is visible on screen, don&#8217;t worry.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian</title>
		<link>http://www.icab.de/blog/2010/10/01/scaling-images-and-creating-thumbnails-from-uiviews/comment-page-1/#comment-4659</link>
		<dc:creator>Brian</dc:creator>
		<pubDate>Tue, 12 Oct 2010 20:00:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=174#comment-4659</guid>
		<description><![CDATA[Great post, thanks. Why is setHidden:NO required? I was hoping to avoid having a view be visible. My goal is to leverage UIViews, render to a UIImage, and ultimately to an OpenGL ES texture object which I will then use in a 3D scene. I don&#039;t want the view itself to ever be visible on screen.]]></description>
		<content:encoded><![CDATA[<p>Great post, thanks. Why is setHidden:NO required? I was hoping to avoid having a view be visible. My goal is to leverage UIViews, render to a UIImage, and ultimately to an OpenGL ES texture object which I will then use in a 3D scene. I don&#8217;t want the view itself to ever be visible on screen.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
