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

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

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

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 03-08-2010, 07:34 AM   #38 (permalink)
rahul
Registered Member
 
Join Date: Jun 2009
Posts: 19
rahul is on a distinguished road
Default

Quote:
Originally Posted by rocotilos View Post
Yup: here it is

Code:
UIGraphicsBeginImageContext(rect.size);
	[oldImage drawInRect:rect];  // scales image to rect
	newImage = UIGraphicsGetImageFromCurrentImageContext();
	UIGraphicsEndImageContext();
rect.size should be your image size (or whatever size you want it to be-its good to resize to smaller size should the user loads up a 3MP or 5MP photos/images) oldimage is original image, from whatever format. and newImage is the image in ABGR.

And, sorry, this code actually returns ABGR all the time, which is good too. my mistake on prev post (for saying convert it to ARGB)..

HTH
Great... Thanks for sharing the information. It helped me a lot.
rahul is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 175,536
Threads: 94,052
Posts: 402,641
Top Poster: BrianSlick (7,979)
Welcome to our newest member, bppnormal11
Powered by vBadvanced CMPS v3.1.0

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