ios - Separate two images joined using UIGraphicsBeginImageContext -


i can merge 2 images using uigraphicsbeginimagecontext.

can reverse process? means can have 2 separate images back?

thanks

you can using cgimagecreatewithimageinrect method. since merged images, should know subregion need when trying separate or un-merge.

pass in cgimage first parameter image trying separate , cgrect second parameter.

cgimagecreatewithimageinrect(originalimage.cgimage, croprect); 

apple doc cgimagecreatewithimageinrect


Comments

Popular posts from this blog

many to many - Django Rest Framework ManyToMany filter multiple values -

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

Java Entity Manager - JSON reader was expecting a value but found 'db' -