How to use the jdenticon.toPng function in jdenticon

To help you get started, we’ve selected a few jdenticon examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github schibsted / tests / memory-game / example-image-server / server.js View on Github external
app.get('/png/:identifier/:size', (req, res) => {
    res.setHeader('Content-Type', 'image/png');
    res.send(jdenticon.toPng(req.params.identifier, Number.parseInt(req.params.size, 10)));
});
github aarohmankad / identicon-api / routes / identicons / generate.js View on Github external
router.get('/:hash/:size', (req, res) => {

		let
			hash = Hash.sha256().update(req.params.hash).digest('hex'),
			size = parseInt(req.params.size),
			identicon;

		if (req.query.format == 'png') {
			identicon = jdenticon.toPng(hash, size);
		} else {
			identicon = jdenticon.toSvg(hash, size);
		}

		return res.send(identicon);
	});
}
github cennznet / runanode / app / renderer / pages / wallet / account / PortfolioSection.js View on Github external
Cell: row => (
          <img width="100rem" src="{`data:image/png;base64," alt="">
        ),
      },