Image Editor
About this app
A powerful online image editor to enhance and modify your images.
Image Editor Image Editor Original Grayscale Sepia Invert Brightness Contrast Save Image
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>Image Editor</title>
<meta name="description" content="A powerful online image editor to enhance and modify your images.">
<meta name="keywords" content="image editor, photo editor, online editor, image manipulation, photo manipulation">
<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">
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<script type="text/javascript">
try {
// App Javascript Goes Here. Place your entire script content inside the try block for error handling.
document.addEventListener("DOMContentLoaded", function() {
// Function to handle image upload
function handleImageUpload(event) {
var file = event.target.files[0];
var reader = new FileReader();
reader.onload = function(e) {
var image = document.getElementById("uploaded-image");
image.src = e.target.result;
}
reader.readAsDataURL(file);
}
// Function to apply filters to the image
function applyFilter(filter) {
var image = document.getElementById("uploaded-image");
image.style.filter = filter;
}
// Function to save the edited image
function saveImage() {
var image = document.getElementById("uploaded-image");
var link = document.createElement('a');
link.href = image.src;
link.download = 'edited_image.png';
link.click();
}
// Event listener for image upload input
var uploadInput = document.getElementById("image-upload");
uploadInput.addEventListener("change", handleImageUpload);
// Event listeners for filter buttons
var filters = document.getElementsByClassName("filter-btn");
for (var i = 0; i < filters.length; i++) {
filters[i].addEventListener("click", function() {
var filter = this.getAttribute("data-filter");
applyFilter(filter);
});
}
// Event listener for save button
var saveBtn = document.getElementById("save-btn");
saveBtn.addEventListener("click", saveImage);
});
} catch (error) {
// This will throw the error to the parent window.
throw error;
}
</script>
<style>
/* App CSS Goes Here */
body {
font-family: 'Roboto', sans-serif;
}
.container {
max-width: 800px;
margin: 0 auto;
text-align: center;
padding: 20px;
}
h1 {
font-size: 24px;
margin-bottom: 20px;
}
.upload-container {
margin-bottom: 20px;
}
#uploaded-image {
max-width: 100%;
border: 1px solid #ccc;
margin-bottom: 20px;
}
.filter-btn {
display: inline-block;
margin-right: 10px;
padding: 5px 10px;
background-color: #f0f0f0;
border: none;
border-radius: 5px;
cursor: pointer;
}
.filter-btn.active {
background-color: #333;
color: #fff;
}
.save-btn {
display: inline-block;
padding: 5px 10px;
background-color: #333;
color: #fff;
border: none;
border-radius: 5px;
cursor: pointer;
}
</style>
</head>
<body>
<div id="main-container" class="container">
<h1>Image Editor</h1>
<div class="upload-container">
<input type="file" id="image-upload" accept="image/*">
</div>
<img id="uploaded-image" src="" alt="Uploaded Image">
<div>
<button class="filter-btn" data-filter="none">Original</button>
<button class="filter-btn" data-filter="grayscale(100%)">Grayscale</button>
<button class="filter-btn" data-filter="sepia(100%)">Sepia</button>
<button class="filter-btn" data-filter="invert(100%)">Invert</button>
<button class="filter-btn" data-filter="brightness(150%)">Brightness</button>
<button class="filter-btn" data-filter="contrast(200%)">Contrast</button>
</div>
<button id="save-btn" class="save-btn">Save Image</button>
</div>
</body>
</html>
NEW APPS
These are apps made by the community!