-
- Notifications
You must be signed in to change notification settings - Fork 152
Closed
Description
Version:
- Nette/Utils v3.0.1
- PHP 7.3.8 (https://windows.php.net/download/)
| GD Support | enabled |
|---|---|
| GD Version | bundled (2.1.0 compatible) |
| FreeType Support | enabled |
| FreeType Linkage | with freetype |
| FreeType Version | 2.9.1 |
| GIF Read Support | enabled |
| GIF Create Support | enabled |
| JPEG Support | enabled |
| libJPEG Version | 9 compatible |
| PNG Support | enabled |
| libPNG Version | 1.6.34 |
| WBMP Support | enabled |
| XPM Support | enabled |
| libXpm Version | 30512 |
| XBM Support | enabled |
| WebP Support | enabled |
But the same bug can be observed on a production machine with Ubuntu Linux:
| GD Support | enabled |
|---|---|
| GD headers Version | 2.2.5 |
| GD library Version | 2.2.5 |
| FreeType Support | enabled |
| FreeType Linkage | with freetype |
| FreeType Version | 2.8.1 |
| GIF Read Support | enabled |
| GIF Create Support | enabled |
| JPEG Support | enabled |
| libJPEG Version | 8 |
| PNG Support | enabled |
| libPNG Version | 1.6.34 |
| WBMP Support | enabled |
| XPM Support | enabled |
| libXpm Version | 30411 |
| XBM Support | enabled |
| WebP Support | enabled |
Bug Description
This (czech language) looks to be an evergreen. I am able to reproduce it with the latest version of package with the EXACT flag and PNG type. However I am positive that I also saw this with WEBP (as I originally had the problem with WEBP and switched to PNG to fix it, it actually helped ! For some time though and now it appeared again!? WTF.)
Steps To Reproduce
\Nette\Utils\Image::fromFile(__DIR__ . '/input.png') ->resize(100, 100, \Nette\Utils\Image::EXACT) ->save(__DIR__ . '/output.png', null, \Nette\Utils\Image::PNG);
- but also "not works" with other images so I guess it is not the problem with the file.
Expected Behavior
Image with transparency preserved.
Possible Solution
I traced the problem down to this line $this->image = imagecrop($this->image, $r);. Commenting it out fixes the alpha problem, but the image is not cropped, obviously :-)
Metadata
Metadata
Assignees
Labels
No labels
