-<h1>ImageSqueeze - lossy image codec</h1>
-<a href="http://www2.svjatoslav.eu/gitweb/?p=imagesqueeze.git;a=snapshot;h=HEAD;sf=tgz">Download</a>
-
-<a href="http://www2.svjatoslav.eu/gitbrowse/imagesqueeze/doc/index.html">Online homepage</a>
-
-<a href="http://svjatoslav.eu/programs.jsp">Other applications hosted on svjatoslav.eu</a>
- <pre>
-<b>Program author:</b>
- Svjatoslav Agejenko
- Homepage: <a href="http://svjatoslav.eu">http://svjatoslav.eu</a>
- Email: <a href="mailto:svjatoslav@svjatoslav.eu">svjatoslav@svjatoslav.eu</a>
-
-This software is distributed under <a href="http://www.gnu.org/licenses/gpl-2.0.html">GNU GENERAL PUBLIC LICENSE Version 2</a>.
-
-
-Lossy image codec. Optimized for photos.
-I developed it to test out an image compression ideas.
-
-I believe my algorithm has following advantages:
- * Fast. Relatively few computations per pixel.
- * Easy to add support for progressive image loading. (Saving is already progressive)
-
-Current limitations / to do:
- * Documentation describing idea behind this algorithm is still missing (lack of time)
- * Code documentation is weak.
- * Better sample applications needed: Commandline image conversion utility. Image viewer.
-
-
-Below are original photo and the same image being compressed down to ~93 Kb and then decompressed.
-<img src="originalAndCompressed.png"/>
-
-When looking very closely, slight grainyness, loss of color precision and
-blurriness (loss of detail) could be noticed as a compression artifacts.
-Still sharp edges are always preserved. Also no blocks typical to JPEG are ever seen.
-I think that is awesome result for just ~ 2.5 bits per pixel on that color photo.
-</pre>
+<div id="content" class="container">
+<div class="row"><div class="col-md-9"><h1 class="title">ImageSqueeze - lossy image codec</h1>
+<hr >
+<ul class="org-ul">
+<li><a href="http://www2.svjatoslav.eu/gitweb/?p=imagesqueeze.git;a=snapshot;h=HEAD;sf=tgz">download latest snapshot</a>
+</li>
+
+<li>This program is free software; you can redistribute it and/or modify it under
+the terms of version 3 of the <a href="https://www.gnu.org/licenses/lgpl.html">GNU Lesser General Public License</a> or later as
+published by the Free Software Foundation.
+</li>
+
+<li>Program author:
+<ul class="org-ul">
+<li>Svjatoslav Agejenko
+</li>
+<li>Homepage: <a href="http://svjatoslav.eu">http://svjatoslav.eu</a>
+</li>
+<li>Email: <a href="mailto://svjatoslav@svjatoslav.eu">mailto://svjatoslav@svjatoslav.eu</a>
+</li>
+</ul>
+</li>
+
+<li><a href="http://www.svjatoslav.eu/programs.jsp">other applications hosted at svjatoslav.eu</a>
+</li>
+</ul>
+
+<div id="outline-container-sec-1" class="outline-2">
+<h2 id="sec-1"><span class="section-number-2">1</span> Overview</h2>
+<div class="outline-text-2" id="text-1">
+<p>
+Lossy image codec. Optimized for photos. I developed it to test out an
+image compression ideas.
+</p>
+
+<p>
+I believe my <a href="#sec-2-1">algorighm has interesting advantages.</a>
+</p>
+
+<p>
+Below are original photo and the same image being compressed down to
+~93 Kb and then decompressed.
+</p>
+
+
+<figure>
+<p><a href="originalAndCompressed.png"><img src="originalAndCompressed.png" class="img-responsive" alt="originalAndCompressed.png"></a>
+</p>
+</figure>
+
+<p>
+When looking very closely, slight grainyness, loss of color precision
+and blurriness (loss of detail) could be noticed as a compression
+artifacts. Still sharp edges are always preserved. Also no blocks
+typical to JPEG are ever seen. I think that is awesome result for
+just ~ 2.5 bits per pixel on that color photo.
+</p>
+</div>
+</div>
+<div id="outline-container-sec-2" class="outline-2">
+<h2 id="sec-2"><span class="section-number-2">2</span> Algorithm description</h2>
+<div class="outline-text-2" id="text-2">
+<ul class="org-ul">
+<li>Color image is split into three separate channels: Y, U and V.
+<ul class="org-ul">
+<li>Each channel is independently compressed.
+</li>
+</ul>
+</li>
+
+<li>Single channel compression method:
+
+<ul class="org-ul">
+<li>Algorithm is inspired by <a href="https://en.wikipedia.org/wiki/Diamond-square_algorithm">diamond-square algorithm</a> that is meant to
+produce random heightmap/plasma effect.
+</li>
+
+<li>During image compression: 2D image surface is iterated in the
+similar manner to diamond-square algorithm. Average color from
+neighbors is calculated and difference between neighbors average
+and actual pixel color is saved. As the pixel grid becomes
+gradually more dense, difference between neighbors tends to get
+smaller, thereby requiring less bits per pixel for storing the
+difference.
+</li>
+</ul>
+</li>
+</ul>
+</div>
+<div id="outline-container-sec-2-1" class="outline-3">
+<h3 id="sec-2-1"><a id="ID-1d917f74-e763-4a71-976e-4aa60732efa6" name="ID-1d917f74-e763-4a71-976e-4aa60732efa6"></a><span class="section-number-3">2.1</span> Algorighm advantages</h3>
+<div class="outline-text-3" id="text-2-1">
+<ul class="org-ul">
+<li>It can be applied to any amount of dimensions, even for sound and
+volumetric data.
+</li>
+
+<li>Algorithm can operate in lossy and lossless mode.
+</li>
+
+<li>Algorithm naturally handles progressive loading. That is: low
+resolution thumbnail of entire thing is immediately available and
+gets gradually more dense during entire loading process.
+</li>
+
+<li>Algorithm naturally supports variable resolution. That is: different
+areas can be encoded with different resolutions / pixel densities.
+</li>
+
+<li>Fast: Very little computations per pixel.
+</li>
+</ul>
+</div>
+</div>
+</div>
+
+<div id="outline-container-sec-3" class="outline-2">
+<h2 id="sec-3"><span class="section-number-2">3</span> <span class="label label-primary TODO">TODO</span> Things to improve</h2>
+<div class="outline-text-2" id="text-3">
+<ul class="org-ul">
+<li>Code documentation is weak.
+</li>
+
+<li>Better sample applications needed:
+<ul class="org-ul">
+<li>Commandline image conversion utility.
+</li>
+<li>Image viewer.
+</li>
+</ul>
+</li>
+
+<li>Add lossless support.
+</li>
+
+<li>Extract algorithm key parts into reusable library and make it
+variable dimensional. So that the same code can be used for sound,
+image and volumetric data compression/decompression.
+</li>
+</ul>
+</div>
+</div>
+</div><div class="col-md-3"><nav id="table-of-contents">
+<div id="text-table-of-contents" class="bs-docs-sidebar">
+<ul class="nav">
+<li><a href="#sec-1">1. Overview</a></li>
+<li><a href="#sec-2">2. Algorithm description</a>
+<ul class="nav">
+<li><a href="#sec-2-1">2.1. Algorighm advantages</a></li>
+</ul>
+</li>
+<li><a href="#sec-3">3. Things to improve</a></li>
+</ul>
+</div>
+</nav>
+</div></div></div>
+<footer id="postamble" class="">
+<div><p class="author">Author: Svjatoslav Agejenko</p>
+<p class="date">Created: 2017-07-07 Fri 14:07</p>
+<p class="creator"><a href="http://www.gnu.org/software/emacs/">Emacs</a> 25.1.1 (<a href="http://orgmode.org">Org-mode</a> 8.2.10)</p>
+</div>
+</footer>