Skip to content

crop image for a shape #449

Description

@naushadck

Image

It is possible to crop an image using image.get_crop().
I believe that it works for a rectangle. But not for a shape.

Is it possible to use image.get_crop() for a given shape.
(Attached the image with marked the location to crop)

More details.
Image - CImg image("sad.bmp");
cimg_library::CImg points(4, 2);
points(0, 0) = 15;
points(0, 1) = 50;
points(1, 0) = 100;
points(1, 1) = 15;
points(2, 0) = 135;
points(2, 1) = 65;
points(3, 0) = 50;
points(3, 1) = 100;
image.draw_polygon(points,rcolor, 1);

How to get the data for the above said polygon area.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions