Created
May 31, 2020 06:59
-
-
Save Schindst/b865a0e531385af16f99bb3b3706091c to your computer and use it in GitHub Desktop.
Image Filters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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()"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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