Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 03-22-2009, 01:57 AM   #18 (permalink)
bhearn
New Member
 
Join Date: Aug 2008
Posts: 125
Default

Quote:
Originally Posted by XenoSage View Post
here's what i think to be an easier way to resize and image.

Code:
UIGraphicsBeginImageContext( newSize );// a CGSize that has the size you want
   [image drawInRect:CGRectMake(0,0,newSize.width,newSize.height)];
//image is the original UIImage
   UIImage* newImage = UIGraphicsGetImageFromCurrentImageContext();
   UIGraphicsEndImageContext();
newImage is your newly created image with the size you want
Yes, this is the easy way to do it -- unless you want to do it in a background thread:

http://www.iphonedevsdk.com/forum/ip...-graphics.html

Then it looks like you have to use something like the code here.
bhearn is offline   Reply With Quote
 

» Advertisements
» Online Users: 316
17 members and 299 guests
ADY, BdR, BrianSlick, djohnson, F_Bryant, Herbie, ilmman, Joseph Nardone, laurielaptop, M@realobjects, Profile, rob.mccarthy, rodgo, Sunny46, TheWebWizz, VikMyr, yomo710
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,876
Threads: 89,225
Posts: 380,702
Top Poster: BrianSlick (7,129)
Welcome to our newest member, jorge599
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 07:50 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.