Skip to content

Regression: Clip() doesn't take the correct bounding box #2019

Description

@nonkeltjebob

Magick.NET version

14.13.1

Environment (Operating system, version and so on)

Q8 x64, both Linux and Windows

Description

Hi,

Clipping seems to have regressed. I have a TIFF file with a clipping path, but when clipping using that path it takes the entire image instead. See sample.

14.13.0 was still fine.

Thanks

Steps to Reproduce

using var img = new MagickImage("samples/synth_input.png");
img.Alpha(AlphaOption.Transparent);
img.Clip("Path 1");          // 14.11.1: keeps pixels inside the path. 14.13.1: masks everything.
img.Alpha(AlphaOption.Opaque);

using var canvas = new MagickImage(MagickColors.Yellow, img.Width, img.Height);
canvas.Composite(img, CompositeOperator.Over);
canvas.Write("actual.png");
Image

Images

synth_input.png

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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions