Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Add image over another image

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 212
    Comment on it

    Using few lines of code we can add one image over another image. It is useful when we need to add a watermark image over an image.

    -(UIImage *)imageWithWaterMarkImage :(UIImage*)topImage  originalImage:(UIImage*)image
    {
       CGSize size = image.size;
        UIGraphicsBeginImageContext( size );
        [image drawInRect:CGRectMake(0,0,size.width,size.height)];
        [topImage drawInRect:CGRectMake( image.size.width-topImage.size.width , image.size.height-topImage.size.height, topImage.size.width, topImage.size.height)]; // Watermark image will be added to bottom right corner
        UIImage* newImage = UIGraphicsGetImageFromCurrentImageContext();
        UIGraphicsEndImageContext();
        return newImage;
    }
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: