99x / contributors-shield

Generate an image for the contributors of a repo
2 stars 13 forks source link

added new feature - set custom background color #26

Closed shalithasuranga closed 7 years ago

shalithasuranga commented 7 years ago

Now background color of output image can be selected at the beginning. fixes 2 items of #27 checklist

rehrumesh commented 7 years ago

This is something you proposed new? Can you link the issue please? Otherwise before work on something new, better to discuss with the team.

@chamathpali please check this.

chamathpali commented 7 years ago

@shalithasuranga this is a good feature to have. Keep white as default since this will be directly embedded in Readme's of repos. Also is there any impact on the file size with color and without color?

shalithasuranga commented 7 years ago

@rehrumesh This PR connects #27 . Okay Next time I will discuss before implement something. Thanks

shalithasuranga commented 7 years ago

@chamathpali

Here is the comparison of files.

Output of current version 62KB

generated_overlap

PR version background "#ffff00" and opacity 1 75KB

new-op-1

PR version background "#ffff00" and opacity 0.5 73KB

new-op-0 5

PR version background "#ffff00" and opacity 0 71KB

new-op-0

Large files

Current version : 3.3 MB PR version background "#ffff00" and opacity 1 : 4.1 MB

it seems there is bit increase in size when colors added and opacity in mid value We are not able to generate alpha levels in jpg. That's why I changed to .png Your ideas please

Thanks

rehrumesh commented 7 years ago

@chamathpali Please review

chamathpali commented 7 years ago

Thanks @shalithasuranga 👍 Good work