iphone - How combine UIImageViews and and save as Single in Gallery as Single Image -


in new iphone project, want combine 5 uiimageviews , and save single in gallery single image.. 5 images in same view possible..?

this combining 2 images 1, you'll need tweak 5.

- (uiimage*)imagebycombiningimage:(uiimage*)firstimage withimage:(uiimage*)secondimage {         uiimage *image = nil;      cgsize newimagesize = cgsizemake(max(firstimage.size.width, secondimage.size.width), max(firstimage.size.height, secondimage.size.height));     if (uigraphicsbeginimagecontextwithoptions != null) {         uigraphicsbeginimagecontextwithoptions(newimagesize, no, [[uiscreen mainscreen] scale]);     } else {         uigraphicsbeginimagecontext(newimagesize);      }     [firstimage drawatpoint:cgpointmake(roundf((newimagesize.width-firstimage.size.width)/2),                                          roundf((newimagesize.height-firstimage.size.height)/2))];      [secondimage drawatpoint:cgpointmake(roundf((newimagesize.width-secondimage.size.width)/2),                                           roundf((newimagesize.height-secondimage.size.height)/2))];      image = uigraphicsgetimagefromcurrentimagecontext();     uigraphicsendimagecontext();      return image; } 

Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -