You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now if you convert a transparent PNG file to a jpeg, the background becomes black. A more sane default here would probably be white. However, it probably makes even more sense to just add a background color option. I'm thinking the function could be called bg. Something like:
logo.png?bg=ffffff
The text was updated successfully, but these errors were encountered:
It doesn't look like there is any background color option with Intervention. It appears the best way to do this is by creating a new canvas with a background color set, and then dropping the image on it. Something like:
However, there is an issue here. The current manipulators all manipulate a single Intervention\Image\Image instance. This is done by variable reference—they don't actually return the manipulated image. Creating a new image, as seen in the example above, will not work, since the new image will have to be returned, not the original. I propose updating the manipulators so that they always return an instance of Intervention\Image\Image, which is then passed to the next manipulator.
Closing this ticket. I've added the bg functionality, and it has been merged into the master branch and will be tagged shortly when I release v1.0! Hopefully not long now.
Right now if you convert a transparent PNG file to a jpeg, the background becomes black. A more sane default here would probably be white. However, it probably makes even more sense to just add a background color option. I'm thinking the function could be called
bg
. Something like:The text was updated successfully, but these errors were encountered: