+ (NSString *)composeWithTop:(UIImage *)topImage bottom:(UIImage *)bottomImage{
CGSize size = CGSizeMake(bottomImage.size.width, topImage.size.height +bottomImage.size.height)
UIGraphicsBeginImageContext(size)
[topImage drawInRect:CGRectMake(0,
0,
topImage.size.width,
topImage.size.height)]
[bottomImage drawInRect:CGRectMake(0,
topImage.size.height,
bottomImage.size.width,
bottomImage.size.height)]
UIImage *image = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()
// return image
NSData *data = UIImageJPEGRepresentation(image, 1.0f)
NSString *imageBase64 = [data base64EncodedStringWithOptions:NSDataBase64Encoding64CharacterLineLength]
return imageBase64
}