Skip to content
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

preserve transparency #158

Open
devozanges opened this issue May 14, 2019 · 0 comments
Open

preserve transparency #158

devozanges opened this issue May 14, 2019 · 0 comments

Comments

@devozanges
Copy link

I've just been looking everywhere for ways to keep the transparent background of my PNGs, maybe adding a line in the doc could be useful for others, in the meantime, you have to do it like that:

$transparent = true;
Image::open($imageSourcePath)
             ->zoomCrop($width, $height, $transparent ? 'transparent' : $hexaColor, 'center', 'center')
             ->save($imageTargetPath, $extension, 85)
        ;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant