Skip to content

Rotated image background won't blend according to Alpha when pasting #164

Description

@rbcbj

Description

I am trying to rotate an image and pasting it over other one. I wanted that the background of the area under rotated image to be "transparent" and have used color.Alpha{0}.

Though, when pasting:

image45 := imaging.Rotate(watermark, float64(-45), color.Alpha{0})
image = imaging.Paste(image, image45, image.Pt(0, 0))

The background won't respect the alpha and won't blend, instead, it will be black.

After some tries, I've used the image.Draw and it will definitely make it work:

draw.Draw(image, image.Bounds(), image45, image.Point{}, draw.Over)

Shouldn't the imaging.Paste result in the same output?

Thanks

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions