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

cron - how to properly run Python script with crontab on every system startup -

elasticsearch - Is the order of operations guaranteed in a bulk update? -

Slow performance first queries on SQL Azure -