dev-resources.site
for different kinds of informations.
Base 64
Published at
3/29/2024
Categories
codepen
images
base64
create
Author
sudo-self
Main Article
Author
9 person written this
sudo-self
open
Upload an image
base64 encode
download as a .txt
download as a .css (background use)
copy string to clipboard
Buttons
//copy to clipboard
function copyToClipboard() {
const textarea = document.getElementById("encodedCode");
textarea.select();
document.execCommand("copy");
alert("Code copied to clipboard!");
}
//download txt
function downloadImage() {
const base64EncodedImage = document.getElementById("encodedCode").value;
const blob = new Blob([base64EncodedImage], { type: "text/plain" });
const link = document.createElement("a");
link.href = URL.createObjectURL(blob);
link.download = "sudo-self.txt"; //file name here//
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
alert("Text file downloaded!");
}
//download css
function downloadCSS() {
const base64EncodedImage = document.getElementById("encodedCode").value;
const cssContent = `body {
background-image: url("${base64EncodedImage}");
background-repeat: no-repeat;
background-size: 80%;
background-attachment: fixed;
}`;
const blob = new Blob([cssContent], { type: "text/plain" });
const link = document.createElement("a");
link.href = URL.createObjectURL(blob);
link.download = "sudo-self.css"; //file name here//
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
alert("CSS file downloaded!");
}
function displayImage(input) {
var file = input.files[0];
var imageType = /image.*/;
if (file.type.match(imageType)) {
var reader = new FileReader();
reader.onload = function (e) {
var img = new Image();
img.src = reader.result;
img.onload = function () {
var width = this.width;
var height = this.height;
document.getElementById("thumbnail").src = this.src;
document.getElementById("thumbnail").style.display = "inline";
document.getElementById("resolution").innerText =
width + " x " + height;
};
};
reader.readAsDataURL(file);
} else {
alert("File format not supported!");
}
}
images Article's
30 articles in total
Proxy de imΓ‘genes.
read article
Deploying Mancala with Minikube β A beginners guide
read article
Collect All Requested Images on a Website Using Puppeteer
read article
Iβm Building a Website Builder Tool, and I Created a Simple Placeholder Image Service Along the Way
read article
Enhancing Data Collection Images AI Accuracy and Performance
read article
Dynamic watermarking on the JVM
read article
Understanding Dockerfile: The Blueprint of Docker Containers and Images
read article
A simple Image to text website built with Next.js
read article
Error while loading images in Oracle APEX application runtime
read article
Base 64
currently reading
Alpaca image generator website Built with ReactJS
read article
Use your own neural net to generate images
read article
How to calculate RGB values in Python
read article
More Fun with AI Generated Images
read article
Useful websites for stock images
read article
Optimizing Images for Enhanced Website Performance: A Free Tool for Your Website
read article
RuGiVi
read article
A Simple Approach to LCP Image Optimization with TwicPics Components
read article
Fix: Opencart cache images not generated
read article
Keeping your fonts in embedded SVG
read article
Upload the image with a preview using HTML, CSS & JavaScript
read article
Handling Image Uploads in Node with Multer and Cloudinary
read article
Before and after image slider in pure CSS
read article
Product Page Images Grid
read article
Convert images in Webp
read article
π Collection of free illustrations for OpenGraph images
read article
Create High Quality Images And Videos With GenmoAI
read article
Instantly adds nice compression artifacts to your JPEG images
read article
React Image Pan And Zoom With Commenting
read article
Bring back the Twitter link preview
read article
Featured ones: