Core Graphics Learning -- one graph is merged into one graph, coregraphics

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.