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

Add ability to output as PNG #140

Merged
merged 6 commits into from Oct 3, 2021
Merged

Add ability to output as PNG #140

merged 6 commits into from Oct 3, 2021

Conversation

Rocksheep
Copy link
Contributor

Description

This PR will add the ability to output the data as a PNG. In order to make this work you will need to have imagick installed and enabled.

There were a couple of changes that I had to make to the SVG as imagick had some issues regarding the mask attribute on the circle and the dy attributes on the text.

In order to fix the mask I added an ellipse after adding the circle. This give the same end result.

To fix the dy I had to eyeball the metrics generated from the created SVG and PNG. After that I adjusted the y attributes in order to align everything again.

Fixes #135

Type of change

  • New feature (added a non-breaking change which adds functionality)
  • Updated documentation (updated the readme, templates, or other repo files)

How Has This Been Tested?

  • Tested locally with a valid username
  • Tested locally with an invalid username
  • Ran tests with composer test

Checklist:

  • I have checked to make sure no other pull requests are open for this issue
  • The code is properly formatted and is consistent with the existing code style
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

Screenshots

image

@DenverCoder1
Copy link
Owner

Wow, this is awesome! Thanks for contributing! 🎉

Copy link
Owner

@DenverCoder1 DenverCoder1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

Only a couple small changes requested.

Also, we may possibly want to update the readme.md and contributing.md to say that composer install is necessary for running locally since it wasn't before (the only external library was PHPUnit) and maybe brief instructions or a link on installing Imagick. It's up to you if you want to add this.

README.md Outdated Show resolved Hide resolved
src/index.php Outdated Show resolved Hide resolved
src/index.php Outdated Show resolved Hide resolved
@Rocksheep
Copy link
Contributor Author

Looks good 👍

Only a couple small changes requested.

Also, we may possibly want to update the readme.md and contributing.md to say that composer install is necessary for running locally since it wasn't before (the only external library was PHPUnit) and maybe brief instructions or a link on installing Imagick. It's up to you if you want to add this.

I have added a link to the official installation guide to the requirements. Do you think that it's enough for people to get started?

Copy link
Owner

@DenverCoder1 DenverCoder1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the link should be good enough for now. If someone has trouble installing it, hopefully they can solve it through Google or come to the repo or Discord for help.

README.md Outdated Show resolved Hide resolved
@DenverCoder1
Copy link
Owner

Thanks for contributing! 🎉

@DenverCoder1 DenverCoder1 merged commit d40fb6c into DenverCoder1:main Oct 3, 2021
@Rocksheep
Copy link
Contributor Author

Always happy to help! 😄

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

Successfully merging this pull request may close these issues.

Add ability to set the output type to PNG
2 participants