Skip to content

Save PNG alpha information when using remote images. #779

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

Merged
merged 2 commits into from
Feb 9, 2018

Conversation

samsullivan
Copy link
Contributor

PNG images downloaded from remote sources can be either blurry or, worse, very glitched. This is because imagesavealpha($image, true) is not run automatically when PNG images are downloaded, created, and saved locally for file creation.

RE: #667

@samsullivan
Copy link
Contributor Author

Please note, I did not test the change to Element\Image::getImageStringData() since my application doesn't use this. If someone wants to run a test, similar to this, with an HTML writer, that would be great.

The logic updated in Writer\AbstractWriter::addFilesToPackage() does fix the problem with the Word2007 writer.

@FBnil FBnil mentioned this pull request Oct 6, 2017
@troosan troosan self-assigned this Jan 1, 2018
@troosan troosan added this to the v0.15.0 milestone Jan 1, 2018
@lalop
Copy link
Contributor

lalop commented Feb 9, 2018

@troosan is it possible to merge this pr to develop branch ?
Thank you

@troosan troosan merged commit fd127ef into PHPOffice:develop Feb 9, 2018
chunfeilung added a commit to GreenClaim/PHPWord that referenced this pull request Jun 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants