OK, i resolve it by replacing kCGBlendModeClear with kCGBlendModeNormal
My function merging 2 pictures worked with iOS 6 but now return am empty picture with ios 7
-
29-06-2022 - |
Frage
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
Lösung
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow