Question

Here is my function, it is known way to merges 2 pictures in iOS :

    - (UIImage * ) mergeSubjectToPlancheAvantGrabcut: (UIImage *)planche
    {
          NSLog(@"mergeSubjectToPlancheAvantGrabcut START");

          UIGraphicsBeginImageContextWithOptions(CGSizeMake(planche.size.width , planche.size.height), NO, 1);

          [planche drawAtPoint: CGPointMake(0,0)];

         [self.imageViewSubject.image drawAtPoint: CGPointMake(0 , 0)
                               blendMode: kCGBlendModeClear // you can play with this
                                   alpha: 1]; // 0 - 1

          NSLog(@"mergeSubjectToPlancheAvantGrabcut END");

          UIImage *answer = UIGraphicsGetImageFromCurrentImageContext();
          UIGraphicsEndImageContext();

          return answer;

     }

As i said, it work with ios6 but not with ios 7 :(

Any idea ?

Thanks

Was it helpful?

Solution

OK, i resolve it by replacing kCGBlendModeClear with kCGBlendModeNormal

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top