Skip to content

Instantly share code, notes, and snippets.

@mariotacke mariotacke/medium.js
Created Jul 11, 2019

Embed
What would you like to do?
for (let y = 0; y < height; y += fontHeight) {
for (let x = 0; x < width; x += fontWidth) {
const frameSection = hiddenContext.getImageData(x, y, fontWidth, fontHeight);
const { r, g, b } = getAverageRGB(frameSection);
outputContext.fillStyle = `rgb(${r},${g},${b})`;
outputContext.fillText('@', x, y);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.