Reputation: 14904
I´ve created an draw module, where i am able to draw over an background image. The "drawings" are an transparent PNG, and i combine it when ill save the image.
But the problem here is that the contrast is sometimes bad to see (see image below).
Before (on paint mode):
After (when ill multiply both images):
(hard to see any yellow).
I multiply both images with:
UIGraphicsBeginImageContextWithOptions(size, false, 0.0)
bottomImage!.draw(in: CGRect(x: 0,y: 0,width: size.width, height: size.height))
topImage!.draw(in: CGRect(x: 0,y: 0,width: size.width, height: size.height), blendMode: CGBlendMode.multiply , alpha: 1.0)
combinedImage = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()
Any ideas how can i get better colors?
Upvotes: 0
Views: 59
Reputation: 535988
Cut the part about the blend mode. Just draw the "painting" (topImage
) directly onto the background (bottomImage
).
Upvotes: 1