Posts

Showing posts from March, 2023

bg

$(function() { var canvas = document.getElementById("canvas"); var ctx = canvas.getContext("2d"); var imageInput = document.getElementById("imageInput"); var removeBackgroundBtn = document.getElementById("removeBackgroundBtn"); var downloadLink = document.getElementById("downloadLink"); imageInput.addEventListener("change", function() { var file = imageInput.files[0]; var reader = new FileReader(); reader.onload = function(event) { var image = new Image(); image.onload = function() { canvas.width = image.width; canvas.height = image.height; ctx.drawImage(image, 0, 0); }; image.src = event.target.result; }; reader.readAsDataURL(file); }); removeBackgroundBtn.addEventListener("click", function() { var imageData = ctx.getImageData(0, 0, canvas.width, canvas.height); var magicWand = new MagicWand(imageData); magicWand.start(
JPEG to PNG Converter JPEG to PNG Converter Select a JPEG file: Convert to PNG Download PNG