Last active
April 24, 2024 09:04
-
-
Save nicolaslegland/f0577cb49b1e56b729a2c0fc0aa151ba to your computer and use it in GitHub Desktop.
QOI decoder
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
<html> | |
<head> | |
<base href="https://gist.githubusercontent.com/nicolaslegland/f0577cb49b1e56b729a2c0fc0aa151ba/raw/" /> | |
<title>QOI decoder</title> | |
<style> | |
a, img, li, ul | |
{ | |
margin: 0; | |
padding: 0; | |
} | |
img | |
{ | |
border: 1px solid #bbb; | |
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgAQMAAABJtOi3AAAABlBMVEXu7u7///8o06qaAAAAFklEQVQI12Ng+P+fgYEIAoyoSBBpLwDtvT/B5CO+hgAAAABJRU5ErkJggg==); | |
margin: 8px 8px 8px 8px; | |
} | |
ul | |
{ | |
list-style-type: none; | |
} | |
</style> | |
</head> | |
<body> | |
<h1>QOI decoder in browser</h1> | |
<h2>Usage</h2> | |
<pre> | |
<img src="<a href="qoi_logo.qoi">qoi_logo.qoi</a>" /><br /> | |
<img src="<a href="testcard.qoi">testcard.qoi</a>" /><img src="<a href="testcard_rgba.qoi">testcard_rgba.qoi</a>" /><br /> | |
<img src="<a href="dice.qoi">dice.qoi</a>" /><br /> | |
<img src="<a href="kodim10.qoi">kodim10.qoi</a>" /><img src="<a href="kodim23.qoi">kodim23.qoi</a>" /><br /> | |
<img src="<a href="wikipedia_008.qoi">wikipedia_008.qoi</a>" /><br /> | |
<img src="<a href="edgecase.qoi">edgecase.qoi</a>" /><br /> | |
...<br /> | |
<script src="<a href="qoi.js">qoi.js</a>"></script> | |
</pre> | |
<h2>Reference</h2> | |
<p>Preview: <a href="https://gistpreview.github.io/?f0577cb49b1e56b729a2c0fc0aa151ba">https://gistpreview.github.io/?f0577cb49b1e56b729a2c0fc0aa151ba</a></p> | |
<p>Source: <a href="https://gist.github.com/nicolaslegland/f0577cb49b1e56b729a2c0fc0aa151ba">https://gist.github.com/nicolaslegland/f0577cb49b1e56b729a2c0fc0aa151ba</a></p> | |
<p>Specification: <a href="https://qoiformat.org/qoi-specification.pdf">https://qoiformat.org/qoi-specification.pdf</a></p> | |
<h2>Result</h2> | |
<ul> | |
<li><a href="qoi_logo.qoi"><img src="qoi_logo.qoi" /></a></li> | |
<li><a href="testcard.qoi"><img src="testcard.qoi" /></a><a href="testcard_rgba.qoi"><img src="testcard_rgba.qoi" /></a></li> | |
<li><a href="dice.qoi"><img src="dice.qoi" /></a></li> | |
<li><a href="kodim10.qoi"><img src="kodim10.qoi" /></a><a href="kodim23.qoi"><img src="kodim23.qoi" /></a></li> | |
<li><a href="wikipedia_008.qoi"><img src="wikipedia_008.qoi" /></a></li> | |
<li><a href="edgecase.qoi"><img src="edgecase.qoi" /></a></li> | |
</ul> | |
<script> | |
var request = new XMLHttpRequest(); | |
request.onreadystatechange = function () | |
{ | |
if ((200 === this.status) && (4 === this.readyState)) | |
{ | |
eval(this.response); | |
} | |
}; | |
request.open('GET', 'qoi.js', true); | |
request.send(); | |
</script> | |
</body> | |
</html> |
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
<!DOCTYPE html> | |
<html dir="ltr" lang="en"> | |
<head> | |
<title>QOI decoder</title> | |
<script><!-- | |
//<![CDATA[ | |
document.location.href = 'https://gistpreview.github.io/?f0577cb49b1e56b729a2c0fc0aa151ba'; | |
//]]> | |
//--></script> | |
</head> | |
<body> | |
<h1>QOI decoder</h1> | |
<a href="https://gistpreview.github.io/?f0577cb49b1e56b729a2c0fc0aa151ba">https://gistpreview.github.io/?f0577cb49b1e56b729a2c0fc0aa151ba</a> | |
</body> | |
</html> |
View raw
(Sorry about that, but we can’t show files that are this big right now.)
View raw
(Sorry about that, but we can’t show files that are this big right now.)
View raw
(Sorry about that, but we can’t show files that are this big right now.)
View raw
(Sorry about that, but we can’t show files that are this big right now.)
View raw
(Sorry about that, but we can’t show files that are this big right now.)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment