Skip to content

Instantly share code, notes, and snippets.

@Schindst
Created May 31, 2020 06:59
Show Gist options
  • Save Schindst/b865a0e531385af16f99bb3b3706091c to your computer and use it in GitHub Desktop.
Save Schindst/b865a0e531385af16f99bb3b3706091c to your computer and use it in GitHub Desktop.
Image Filters
<h1>Fun Filters</h1>
<h3>Explore exciting image filters</h3>
<canvas id="can"></canvas>
<p>
<input id="upload" type="file"
multiple="false" accept="image/*"
onchange="loadImage()">
</p>
<p>
<input id="makegray" value="gray"
type=button onclick="makeGray()">
<input id="makeblue" value="blue"
type=button onclick="makeBlue()">
<input id="makerainbow" value="rainbow"
type=button onclick="makeRainbow()">
</p>
<input id="revert" value="revert"
type=button onclick="revertToOriginal()">
var origImage = null;
var grayImage = null;
var blueImage = null;
var rainbowImage = null;
function loadImage() {
alert('uploading');
}
function makeGray() {
alert('making gray');
}
function makeRainbow() {
alert('making rainbow');
}
function makeBlue() {
alert('making blue');
}
function revertToOriginal() {
alert('reverting');
}
body {
background-image: linear-gradient(to bottom right, purple , yellow);
text-align: center;
color: white;
font-family: helvetica;
}
h1 {
text-transform: uppercase;
}
h3 {
text-transform: lowercase;
}
canvas {
background-color: white;
border-radius: 20px;
width: 250ptx;
}
input {
width: 40ptx;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment