Core Graphics Learning -- one graph is merged into one graph, coregraphics
-(UIImage *) MergeTwoImage {UIImage * img = [UIImage imageNamed: @ "icon"]; CGSize sz = img. size; uigraphicsbeginimagecontextwitexceptions (CGSizeMake (sz. width * 2, sz. height), NO, 0); [img drawAtPoint: CGPointMake (0, 0)]; [img drawAtPoint: CGPointMake (sz. width, 0)]; UIImage * mergeImg = UIGraphicsGetImageFromCurrentImageContext (); UIGraphicsEndImageContext (); return mergeImg ;}
How can I combine two or more images?
What effect do you want?
If you want them to appear together rather than overlap, use the built-in drawing tool in windows.
1. The specific method is to open the "Drawing" and enlarge the blank to facilitate the next operation.
2. Click "paste source" on the menu and drag the pasted image to a proper place.
3. In this case, this is the simplest
PS how to merge two images into one, adjust the size, and how to remove the excess part of the picture moved past?
1. First open an image, double-click the image layer to unlock it, and then enter "image" in the menu --> canvas size,
Then you will add the width and height (prepare for importing another image) on the basis of the original one ).
2. Open another image and drag it to the previous image. In this way, the two images are put together.
3. After adjusting the merging positions of the two images, use the cropping tool to cut out the unneeded parts. The fourth part under the arrow tool is.