PhotoSnap - Capture Life's Moments
About this app
PhotoSnap is an interactive camera app that allows you to capture moments, apply filters, and share your memories with friends and family.
PhotoSnap - Capture Life's Moments PhotoSnap No Filter Grayscale Sepia Blur Capture Photo Captured Photos
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>PhotoSnap - Capture Life's Moments</title>
<meta name="description" content="PhotoSnap is an interactive camera app that allows you to capture moments, apply filters, and share your memories with friends and family.">
<meta name="keywords" content="camera, photography, filters, photo, snap, share, interactive, gallery">
<!-- Libraries -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.min.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.6.0/css/fontawesome.min.css" crossorigin="anonymous">
<script type="text/javascript">
try {
document.addEventListener("DOMContentLoaded", function() {
const captureButton = document.getElementById('capture');
const photoGallery = document.getElementById('photo-gallery');
const filters = ['filter1', 'filter2', 'filter3']; // Add more filters as needed
const video = document.createElement('video');
video.autoplay = true;
navigator.mediaDevices.getUserMedia({ video: true }).then(stream => {
video.srcObject = stream;
}).catch(err => console.error("Error accessing camera: ", err));
captureButton.addEventListener('click', function() {
const canvas = document.createElement('canvas');
canvas.width = 640;
canvas.height = 480;
const ctx = canvas.getContext('2d');
ctx.drawImage(video, 0, 0, canvas.width, canvas.height);
const img = document.createElement('img');
img.src = canvas.toDataURL('image/png');
img.className = 'img-thumbnail';
img.style.filter = document.getElementById('filter-select').value;
const listItem = document.createElement('li');
listItem.appendChild(img);
photoGallery.appendChild(listItem);
});
});
} catch (error) {
throw error;
}
</script>
<style>
body {
background: linear-gradient(to right, #ff7e5f, #feb47b);
color: white;
}
#main-container {
text-align: center;
padding: 50px;
}
video {
border-radius: 10px;
width: 640px;
height: 480px;
background: black;
}
#photo-gallery {
list-style: none;
padding: 0;
}
li {
display: inline-block;
margin: 10px;
}
select {
margin-top: 10px;
}
</style>
</head>
<body>
<div id="main-container" class="container">
<h1 class="mb-4">PhotoSnap</h1>
<video id="camera-preview"></video>
<div>
<select id="filter-select" class="form-select my-3">
<option value="">No Filter</option>
<option value="grayscale(1)">Grayscale</option>
<option value="sepia(1)">Sepia</option>
<option value="blur(3px)">Blur</option>
</select>
<button id="capture" class="btn btn-primary">Capture Photo</button>
</div>
<h2 class="mt-4">Captured Photos</h2>
<ul id="photo-gallery"></ul>
</div>
</body>
</html>
NEW APPS
These are apps made by the community!