Calculator Tools Calculator Tools
Create

Editor de Imagens

Jan 5, 2024

About this app

Um editor de imagens com os efeitos de Caneta Mágica e Colorido

Editor de Imagens Editor de Imagens Caneta Mágica Colorido

Related apps

Put this on your site

Source

                    <html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">

<title>Editor de Imagens</title>
<meta name="description" content="Um editor de imagens com os efeitos de Caneta Mágica e Colorido">
<meta name="keywords" content="editor de imagens, caneta mágica, colorido">

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">

<script type="text/javascript">
try {
// App Javascript Goes Here. Place your entire script content inside the try block for error handling.

// This will run when the DOM is ready.
document.addEventListener("DOMContentLoaded", function() {
// Function to apply the magic pen effect to the image
function applyMagicPenEffect() {
// Get the image URL from the user
var imageUrl = prompt("Enter the URL of the image:");

// Create a new image element
var imageElement = document.createElement("img");
imageElement.src = imageUrl;
imageElement.style.maxWidth = "100%";

// Apply the magic pen effect to the image
imageElement.style.filter = "invert(100%)";

// Add the image to the page
document.getElementById("main-container").appendChild(imageElement);
}

// Function to apply the color effect to the image
function applyColorEffect() {
// Get the image URL from the user
var imageUrl = prompt("Enter the URL of the image:");

// Create a new image element
var imageElement = document.createElement("img");
imageElement.src = imageUrl;
imageElement.style.maxWidth = "100%";

// Apply the color effect to the image
imageElement.style.filter = "hue-rotate(90deg)";

// Add the image to the page
document.getElementById("main-container").appendChild(imageElement);
}

// Event listener for the magic pen button
document.getElementById("magic-pen-button").addEventListener("click", applyMagicPenEffect);

// Event listener for the color button
document.getElementById("color-button").addEventListener("click", applyColorEffect);
});

} catch (error) {
// This will throw the error to the parent window.
throw error;
}
</script>

<style>
/* App CSS Goes Here */
body {
background-color: #f9f9f9;
font-family: 'Roboto', sans-serif;
}

#main-container {
margin-top: 50px;
text-align: center;
}

h1 {
color: #333;
}

.btn {
margin-top: 20px;
}

.image-container {
margin-top: 50px;
}
</style>
</head>
<body>
<div id="main-container" class="container">
<h1>Editor de Imagens</h1>

<button id="magic-pen-button" class="btn btn-primary">Caneta Mágica</button>

<button id="color-button" class="btn btn-success">Colorido</button>

<div class="image-container">
<!-- Images will be added here -->
</div>
</div>
</body>
</html>