What im doing is loading an image from photo library or camera into a UIImageView of lets say 300x300, then i'm allowing users to add more smaller objects (images) on top and when the user saves it resizes and makes everything fit into a 600x600 image.
This is the code i'm using
Code:
CGSize newSize = CGSizeMake(600, 600);
UIGraphicsBeginImageContext(newSize);
//I'm resizing the original image to fit in the 600x600 without losing it's aspect ratio
[[self resizeImage:orignalImage] drawInRect:CGRectMake(0,0,newSize.width, newSize.height)];
//Here i got a for loop going through all the other images the user added ontop and does drawInRect with them
UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return newImage;
So Everything is working fine. The only problem is after merging all the images whatever of the 600x600 isn't being covered by an image is filled in with White background.
Is there any way to make the background Transparent? or any different color?
Thanks