Quote:
Originally Posted by rocotilos
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.