Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normal Blend black outs base image #329

Open
fazal-e-majid opened this issue Sep 18, 2021 · 0 comments
Open

Normal Blend black outs base image #329

fazal-e-majid opened this issue Sep 18, 2021 · 0 comments

Comments

@fazal-e-majid
Copy link

I've two images (given below) and I want to blend them using NormalBlend.

Background
sBackground

Blend Image
front

After applying Normal Blend like so:

var background = PictureInput(imageName: "sBackground.jpg")
var blendImage = PictureInput(imageName: "front.jpg")

var transformOperation = TransformOperation()
transformOperation.transform = Matrix4x4(getScaledCGAffineTransform( ) )

var normalBlend = NormalBlend()

background.addTarget(normalBlend, atTargetIndex: 0)

blendImage.addTarget(transformOperation)
transformOperation.addTarget(normalBlend, atTargetIndex: 1)

normalBlend.addTarget(renderView)

background.processImage()
blendImage.processImage()

I get this result :
output

But this is not what I want and expect. Instead I want my result to be like this:

required

@BradLarson , @joshbernfeld if you could help me please.
Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant