-
-
Notifications
You must be signed in to change notification settings - Fork 416
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
ExtractArea with x and y = 0 returns the entire image instead of the extracted part #1674
Comments
It looks like there is a difference for ImageMagick between |
Another option would be to only do this when a constructor overload with both |
Thanks for the quick reply! This solution sounds good to me. For now, I do not have any workaround to deal with this issue other than setting the x value to 1 when it is equal to 0. I understand that this could be a breaking change for some users, but the current behavior is more likely to cause errors. |
I decided to include |
Amazing, thanks for the support 👏 |
Magick.NET version
13.9.1, Magick.NET-Q8-AnyCPU
Environment (Operating system, version and so on)
WSL Debian
Description
When using the
MagickReadSettings
with theExtractArea
set to x and y = 0, the created image is the entire image resized by the specified width and height instead of the extracted part. This issue only occurs when x and y are both set to 0. If x is set to 1, the output image is correct.I also tried with the Magick CLI directly, and everything works as expected.
magick -extract 256x256+0+0 ./demo.png extracted.jpg
Steps to Reproduce
demo.png
Result:
Expected:
The text was updated successfully, but these errors were encountered: