Vojta Grec
Vojta Grec
@olivervogel I'd like to reopen this, I see what probably is the same error. Just in my case, I'm loading a JPEG, scaling it down and saving it as PNG....
~Tried bisecting the issue and it's there even with intervention/image 3.0. So it's not a recent regression.~ I stand corrected, I had a flaw in my bisect. It looks like...
Adding the following to `Intervention\Image\Drivers\Imagick\Encoders\PngEncoder::encode()` seems to fix the issue. ```php if (! $output->getImageAlphaChannel()) { $output->setImageAlphaChannel(Imagick::ALPHACHANNEL_REMOVE); } ``` It looks like there is some (random?) alpha channel even wnile IMagick's...
I'm not so sure about the "fix" anymore, in another environment only `ALPHACHANNEL_RESET` worked. Given how `Imagick` constants depend on ImageMagick version, it would be better to avoid that. So...
This might be related (so it might be ImageMagick 6.9 specific): https://github.com/ImageMagick/ImageMagick/discussions/3270 (Both the repro provided by @SCIF and my test environment use ImageMagick 6.9.)
@olivervogel Thanks for your time. We'll upgrade to ImageMagick 7 or libvips eventually (we can't do it right away though), so we'll just patch intervention/image in the meantime (to basically...