-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Using the imagick driver to crop and resize a png will create artifacts in the output #1426
Comments
Thanks for reporting. I will look into this. Although I can confirm the error, there is a workaround here. I believe the same result can be achieved with the following call. $imageManager = new \Intervention\Image\ImageManager(new \Intervention\Image\Drivers\Imagick\Driver());
$image = $imageManager->read('Sample.png');
$image->cover(220, 150);
$image->save('SampleCropped.png'); |
The CropModifier produced strange artifacts if another resize step was performed after the modification. This patch removes the copying of the alpha channel in the CropModifier and implements a different method. See: #1426
This should work now with |
I can confirm it has been resolved in |
Describe the bug
When using the Imagick driver to crop and resize an image the output contains artifacts, most noticeable in transparent areas (the transparent area is mostly black with random noise).
This does not happen in version <= 3.10.2
When either crop or resize is skipped the artifacts do not appear
Code Example
Expected behavior
The image is cropped and resized without adding artifacts
Images
Environment:
The text was updated successfully, but these errors were encountered: