Reputation: 365
I want to place the picked image on top of another image, so that my picked image will be placed in some sort of frame I made in Photoshop. After combining the images I want to save it to the disk.
Does anyone know how to do it, or maybe have a link to examples?
Upvotes: 1
Views: 610
Reputation: 6373
You can also add the picture UIImageView directly the the frame UIImageView: same as Daniel's suggestion above, but [frame.view addSubview: pic] instead.
Upvotes: 0
Reputation: 22395
You can just layer the two images on top of each other, first add the frame image, then add the image with the photo...
Heres sample code
Assuming your 2 images are already sized correctly to fit one on top of t he other, this code would be in a view controller
UIImageView *frame=[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Frame.png"]];
UIImageView *pic=[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"pic.png"]];
frame.center=[self.view center];
pic.center=[self.view center];
[self.view addSubview:frame];
[self.view addSubview:pic];
here it is, memory managment has not been written in..
Upvotes: 1