Created
June 21, 2016 13:37
-
-
Save azder/58ab0d433d60f58fbef1d9f5d33b3a95 to your computer and use it in GitHub Desktop.
generate png image from html out of the page logo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="bower-components/html2canvas/build/html2canvas.min.js"></script> | |
<style> | |
#logo { | |
width: 128px; | |
height: 128px; | |
font-size: 78px !important; | |
} | |
</style> | |
<script>(function (w, $, canv) { | |
w.setTimeout(function () { | |
canv($('#logo'), { | |
onrendered: function (canvas) { | |
document.body.appendChild(canvas); | |
} | |
}); | |
}, 5000); | |
}(window, jQuery, html2canvas))</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment