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

Retinify #46

Merged
merged 6 commits into from Sep 20, 2013
Merged

Retinify #46

merged 6 commits into from Sep 20, 2013

Conversation

ggPeti
Copy link
Contributor

@ggPeti ggPeti commented Sep 7, 2013

I added Retina support along with some rethinking of how the rounded rectangle is drawn. Now it uses a curved path with no stroke, only fill, and the corner radius is adjustable from a local variable - it would be easy to govern it from the options now. I hardcoded the corner radius to be 3, that gave me the closest result to the original version on low-res.

screen shot 2013-09-07 at 6 11 46 am
On the image the leftmost tab shows the original version, the second one shows the new version on low resolution, and the rightmost one shows the new version on high resolution.

The favicon itself will be high resolution if a 32x32 icon is present, otherwise we fall back to the 16x16 version.

Oh and I hope you don't mind but I used a minifier that shortens local variable names too.

@ggPeti
Copy link
Contributor Author

ggPeti commented Sep 7, 2013

Had to change new Image() to document.createElement('img') because there is a Chrome bug that makes it throw an exception on drawImage. More info about it here: https://code.google.com/p/chromium/issues/detail?id=238071

@tommoor tommoor merged commit 4e5d216 into tommoor:master Sep 20, 2013
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.

None yet

2 participants