mirror of
https://github.com/flyimg/flyimg.git
synced 2026-04-25 01:35:56 +03:00
[GH-ISSUE #514] Cropping Image Changes Transparent Background To Solid Color #794
Labels
No labels
Docs
Docs
Docs
Security
UnitTest
bug
dependencies
duplicate
enhancement
enhancement
enhancement
hacktoberfest
help wanted
invalid
pull-request
question
stale
version 1
version 2
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/flyimg#794
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Jim-Webfox on GitHub (Sep 26, 2024).
Original GitHub issue: https://github.com/flyimg/flyimg/issues/514
Originally assigned to: @sadok-f on GitHub.
When taking an image with a transparent background, after resizing, cropping and setting output to png, a solid background is added to the image, it is no longer transparent.
Failing Result
https://demo.flyimg.io/upload/w_100,h_50,c_1,o_png/https://brandslogos.com/wp-content/uploads/images/large/laravel-logo-1.png
The image should maintain its transparent background.
@sadok-f commented on GitHub (Sep 26, 2024):
Hi @Jim-Webfox ,
Thank you for opening this issue!
Yes, it seems the crop option adds a black background to the generated image.
I'll check it and I'll keep you updated.
@sadok-f commented on GitHub (Sep 26, 2024):
@Jim-Webfox can you try again? I've deployed a new version with a potential fix.
since we're using the
extentoption to match the desired size given, we need to add-background noneto remove the added background (black in your case).@Jim-Webfox commented on GitHub (Sep 26, 2024):
@sadok-f Thanks for jumping on this so quickly!
It appears that its still happening. The link I provided in the initial issue still shows this, unless its using an old version of flyimg on the demo site?
@sadok-f commented on GitHub (Sep 26, 2024):
Actually if you add the refresh option you'll get a new generated image
rf_1and the older image should be replaced by the new one, which is not the case here.I need to look into this issue as well
@Jim-Webfox commented on GitHub (Sep 26, 2024):
Ah good to know in future!
@sadok-f commented on GitHub (Sep 26, 2024):
I think I know what is happening, its not a bug.
Recently we started running the demo page on a docker swarm cluster, where the nodes are not sharing the cache nor the generated images folders.
So the rf_1 option should hit all of the nodes to get the refreshed generated image.
@Jim-Webfox commented on GitHub (Sep 26, 2024):
It Works!
https://demo.flyimg.io/upload/w_100,h_50,c_1,r_1,o_png/https://brandslogos.com/wp-content/uploads/images/large/laravel-logo-1.png
@Jim-Webfox commented on GitHub (Sep 26, 2024):
Oh its rf_1 not r_1?
@Jim-Webfox commented on GitHub (Sep 26, 2024):
ah still works
https://demo.flyimg.io/upload/w_100,h_50,c_1,rf_1,o_png/https://brandslogos.com/wp-content/uploads/images/large/laravel-logo-1.png
@Jim-Webfox commented on GitHub (Sep 26, 2024):
Im happy, if your happy also we can close this issue.
Thank you