-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Transparent Images (PNG) has black background when converted. #3502
Comments
@timvandijck Any update regarding this fix? |
Having the same problem since v11 Don't know if related, but I'm also getting this error for my transparent files:
Versions
spatie/image: 3.3.4 |
@langeuh So using Edit/Update: |
This should be fixed in the latest version of the spatie/image package that is used by the medialibrary package. |
@timvandijck I checked but still I am getting the black background with the latest spatie/image package. I was initially using |
I checked with |
@anuzpandey5 intresting, would you mind running the test in the spatie/image package? vendor/bin/pest --filter "works with transparent pngs" I'm curious if our differences in results are machine specific or if something else is causing it. |
@timvandijck This is still an issue. Tested on the above image with "spatie/laravel-medialibrary": "11.9.1", |
Ok, so for anyone having this issue after migrating from older media-library - it looks like before the white backgound was the default, now you need to explicitly set in in your conversion with |
Indeed, I believe in hindsight it was not ideal to have this default changed, but reverting it back might again cause problems for people who expect it to be there. For now passing any color that includes transparency like |
As title says, when a conversion is made on transparent png image, the converted image has black background.
The new version of the package started having this issue, installed version:
11.0.4
There was an additional issue with
Fit::Crop
which has been resolved by installingspatie/images: 3.3.3
.Original Image:
Converted Image:
The text was updated successfully, but these errors were encountered: