Computer scienceProgramming languagesJavaScriptInteraction with a browserDOM Interaction

Canvas: working with images

Match snippets

Report a typo

Match the code snippets with their corresponding descriptions.

Match the items from left and right columns
context.filter = 'grayscale(100%)';
image.onload = () => {...};
context.rotate(angle * Math.PI / 180);
const link = document.createElement('a'); link.href = canvas.toDataURL('image/png');
Loads the image and draws it on the canvas
Saves the canvas content as an image file
Rotates the image by a specific angle
Makes the image grayscale

Create a free account to access the full topic