Spaces:
Running

hdr-master-blaster / index.html
sendax's picture
sono un fotografo e mi piace modificare le foto con l HDR, creami un app in modo che io possa regolare l'intensità dell HdR, la saturazione, i toni ,ed il colore. inoltre un tasto per poter salvare il lavoro e aggiungi anche nuova foto e reset. dai il nome all app in: HDR CENCIO
7dda21d verified
Raw History Blame Contribute Delete
9.06 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>HDR Master Blaster</title>
<link rel="stylesheet" href="style.css">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<script src="https://unpkg.com/feather-icons"></script>
<style>
[type="range"] {
-webkit-appearance: none;
height: 6px;
background: #e2e8f0;
border-radius: 5px;
background-image: linear-gradient(#3b82f6, #3b82f6);
background-repeat: no-repeat;
}
[type="range"]::-webkit-slider-thumb {
-webkit-appearance: none;
height: 18px;
width: 18px;
border-radius: 50%;
background: #3b82f6;
cursor: pointer;
box-shadow: 0 0 2px 0 #555;
transition: all .3s ease;
}
[type="range"]::-webkit-slider-thumb:hover {
box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}
[type="range"]::-webkit-slider-runnable-track {
-webkit-appearance: none;
box-shadow: none;
border: none;
background: transparent;
}
</style>
</head>
<body class="bg-gray-100 min-h-screen">
<div class="container mx-auto px-4 py-8">
<header class="mb-8 text-center">
<h1 class="text-4xl font-bold text-gray-800">HDR Master Blaster 📸</h1>
<p class="text-gray-600 mt-2">Transform your photos with powerful HDR effects</p>
</header>
<div class="grid grid-cols-1 lg:grid-cols-3 gap-8">
<!-- Image Upload and Preview -->
<div class="bg-white rounded-xl shadow-lg p-6 h-full">
<div class="flex flex-col h-full">
<h2 class="text-xl font-semibold text-gray-800 mb-4">Photo Editor</h2>
<div class="relative border-2 border-dashed border-gray-300 rounded-lg mb-4 flex-1 flex items-center justify-center">
<img id="imagePreview" src="http://static.photos/nature/640x360" alt="Preview" class="max-w-full max-h-80 object-contain">
<div id="uploadOverlay" class="absolute inset-0 flex flex-col items-center justify-center bg-black bg-opacity-50 text-white p-4 hidden">
<i data-feather="upload" class="w-12 h-12 mb-2"></i>
<p>Drop your image here</p>
</div>
</div>
<div class="flex space-x-2">
<button id="uploadBtn" class="flex-1 bg-blue-500 hover:bg-blue-600 text-white py-2 px-4 rounded-lg flex items-center justify-center">
<i data-feather="upload" class="mr-2"></i> Upload
</button>
<input type="file" id="fileInput" accept="image/*" class="hidden">
<button id="resetBtn" class="flex-1 bg-gray-500 hover:bg-gray-600 text-white py-2 px-4 rounded-lg flex items-center justify-center">
<i data-feather="refresh-ccw" class="mr-2"></i> Reset
</button>
</div>
</div>
</div>
<!-- Controls -->
<div class="bg-white rounded-xl shadow-lg p-6">
<h2 class="text-xl font-semibold text-gray-800 mb-6">HDR Controls</h2>
<div class="space-y-6">
<!-- HDR Intensity -->
<div>
<div class="flex justify-between items-center mb-2">
<label for="hdrIntensity" class="text-gray-700 font-medium">HDR Intensity</label>
<span id="hdrValue" class="text-gray-500">50%</span>
</div>
<input type="range" id="hdrIntensity" min="0" max="100" value="50" class="w-full">
</div>
<!-- Saturation -->
<div>
<div class="flex justify-between items-center mb-2">
<label for="saturation" class="text-gray-700 font-medium">Saturation</label>
<span id="saturationValue" class="text-gray-500">50%</span>
</div>
<input type="range" id="saturation" min="0" max="100" value="50" class="w-full">
</div>
<!-- Tones -->
<div>
<div class="flex justify-between items-center mb-2">
<label for="tones" class="text-gray-700 font-medium">Tones</label>
<span id="tonesValue" class="text-gray-500">50%</span>
</div>
<input type="range" id="tones" min="0" max="100" value="50" class="w-full">
</div>
<!-- Color Temperature -->
<div>
<div class="flex justify-between items-center mb-2">
<label for="colorTemp" class="text-gray-700 font-medium">Color Temperature</label>
<span id="colorTempValue" class="text-gray-500">50%</span>
</div>
<input type="range" id="colorTemp" min="0" max="100" value="50" class="w-full">
</div>
<!-- Brightness -->
<div>
<div class="flex justify-between items-center mb-2">
<label for="brightness" class="text-gray-700 font-medium">Brightness</label>
<span id="brightnessValue" class="text-gray-500">50%</span>
</div>
<input type="range" id="brightness" min="0" max="100" value="50" class="w-full">
</div>
<!-- Contrast -->
<div>
<div class="flex justify-between items-center mb-2">
<label for="contrast" class="text-gray-700 font-medium">Contrast</label>
<span id="contrastValue" class="text-gray-500">50%</span>
</div>
<input type="range" id="contrast" min="0" max="100" value="50" class="w-full">
</div>
</div>
</div>
<!-- Save and Export -->
<div class="bg-white rounded-xl shadow-lg p-6">
<h2 class="text-xl font-semibold text-gray-800 mb-6">Export Options</h2>
<div class="space-y-4">
<div class="bg-gray-100 rounded-lg p-4">
<h3 class="font-medium text-gray-700 mb-2">Image Format</h3>
<div class="flex space-x-4">
<label class="inline-flex items-center">
<input type="radio" name="format" value="jpg" checked class="form-radio text-blue-500">
<span class="ml-2">JPG</span>
</label>
<label class="inline-flex items-center">
<input type="radio" name="format" value="png" class="form-radio text-blue-500">
<span class="ml-2">PNG</span>
</label>
</div>
</div>
<div class="bg-gray-100 rounded-lg p-4">
<h3 class="font-medium text-gray-700 mb-2">Quality</h3>
<input type="range" id="quality" min="10" max="100" value="90" class="w-full">
<div class="flex justify-between text-sm text-gray-500 mt-1">
<span>Low</span>
<span id="qualityValue">90%</span>
<span>High</span>
</div>
</div>
<button id="saveBtn" class="w-full bg-green-500 hover:bg-green-600 text-white py-3 px-4 rounded-lg flex items-center justify-center mt-6">
<i data-feather="download" class="mr-2"></i> Save Image
</button>
<div id="downloadLink" class="hidden mt-4"></div>
</div>
</div>
</div>
</div>
<script src="script.js"></script>
<script>feather.replace();</script>
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
</body>
</html>