Scaling UIImages without losing orientation
We’ve moved!
Hey everyone, all my tech blog posts are now at my personal blog at http://blog.twoalex.com. I’ll keep blogging about Mealstrom here, but you should hop on over there to check out the latest and greatest about technology (and food) in general.
This is a great little function and I use it all the time! A quick note however, it contains a slight little bug. Depending on the height of the input image, you may end up with a slight 1px white line on top of the image. This is due to rounding and the fix would be a simple floor():
bounds.size.height = floor(bounds.size.width / ratio);
I have been searching for sites related to this. Glad I found you. Thanks
Hi,
This is good tutorial. I am looking to do scaling in UIWebView which subview of View.
I have treid to do using CGAffineTransfomScale function to scale down WebView content but I didn’t get scaled in WebView content but it scaled WebView Frame.
I am looking to scale down 480×270 window WebView content into 120×90 size.
Do you have any idea about this?
Please suggest me.
Thanks,
rach