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

The ImageCrop function didn't crop the size correctly #9

Open
tugbargn opened this issue Nov 23, 2023 · 1 comment
Open

The ImageCrop function didn't crop the size correctly #9

tugbargn opened this issue Nov 23, 2023 · 1 comment

Comments

@tugbargn
Copy link

tugbargn commented Nov 23, 2023

Hello,
I tried to apply smartcrop into a console application in .Net.
I used this sample code:

int width = 430;
int height = 135;

// find best crop
var output = new ImageCrop(width, height).Crop(bytes);

Console.WriteLine($"Best crop: {output.Area.X}, {output.Area.Y} - {output.Area.Width} x {output.Area.Height}");

Output:
Best crop: 0, 10 - 901 x 284

Image property is Width=900, Height=327/

Am I doing something wrong?

@Skleni
Copy link
Member

Skleni commented Nov 28, 2023

Hi, can you share the image you're using? It would help us reproduce the issue.

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

2 participants