From 3290570a4cac6708f4488f068029e557c96e1853 Mon Sep 17 00:00:00 2001 From: Svjatoslav Agejenko Date: Fri, 7 Jul 2017 14:09:05 +0200 Subject: [PATCH] Updated documentation. --- doc/index.html | 397 +++++++++++++++++++++++++++++++++++++++++++------ doc/index.org | 87 +++++++++++ 2 files changed, 442 insertions(+), 42 deletions(-) create mode 100644 doc/index.org diff --git a/doc/index.html b/doc/index.html index 406aa91..5301bcf 100644 --- a/doc/index.html +++ b/doc/index.html @@ -1,47 +1,360 @@ - - + + - - ImageSqueeze +ImageSqueeze - lossy image codec + + + + + + + +" + + + -

ImageSqueeze - lossy image codec

-Download -   -Online homepage -   -Other applications hosted on svjatoslav.eu -
-Program author:
-    Svjatoslav Agejenko
-    Homepage: http://svjatoslav.eu
-    Email: svjatoslav@svjatoslav.eu
-
-This software is distributed under GNU GENERAL PUBLIC LICENSE Version 2.
-
-
-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.
-
-
-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. 
-
+
+

ImageSqueeze - lossy image codec

+
+ + +
+

1 Overview

+
+

+Lossy image codec. Optimized for photos. I developed it to test out an +image compression ideas. +

+ +

+I believe my algorighm has interesting advantages. +

+ +

+Below are original photo and the same image being compressed down to +~93 Kb and then decompressed. +

+ + +
+

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. +

+
+
+
+

2 Algorithm description

+
+
    +
  • Color image is split into three separate channels: Y, U and V. +
      +
    • Each channel is independently compressed. +
    • +
    +
  • + +
  • Single channel compression method: + +
      +
    • Algorithm is inspired by diamond-square algorithm that is meant to +produce random heightmap/plasma effect. +
    • + +
    • 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. +
    • +
    +
  • +
+
+
+

2.1 Algorighm advantages

+
+
    +
  • It can be applied to any amount of dimensions, even for sound and +volumetric data. +
  • + +
  • Algorithm can operate in lossy and lossless mode. +
  • + +
  • 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. +
  • + +
  • Algorithm naturally supports variable resolution. That is: different +areas can be encoded with different resolutions / pixel densities. +
  • + +
  • Fast: Very little computations per pixel. +
  • +
+
+
+
+ +
+

3 TODO Things to improve

+
+
    +
  • Code documentation is weak. +
  • + +
  • Better sample applications needed: +
      +
    • Commandline image conversion utility. +
    • +
    • Image viewer. +
    • +
    +
  • + +
  • Add lossless support. +
  • + +
  • 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. +
  • +
+
+
+
+ diff --git a/doc/index.org b/doc/index.org new file mode 100644 index 0000000..e98689d --- /dev/null +++ b/doc/index.org @@ -0,0 +1,87 @@ +#+TITLE: ImageSqueeze - lossy image codec + +----- +- [[http://www2.svjatoslav.eu/gitweb/?p=imagesqueeze.git;a=snapshot;h=HEAD;sf=tgz][download latest snapshot]] + +- This program is free software; you can redistribute it and/or modify it under + the terms of version 3 of the [[https://www.gnu.org/licenses/lgpl.html][GNU Lesser General Public License]] or later as + published by the Free Software Foundation. + +- Program author: + - Svjatoslav Agejenko + - Homepage: http://svjatoslav.eu + - Email: mailto://svjatoslav@svjatoslav.eu + +- [[http://www.svjatoslav.eu/programs.jsp][other applications hosted at svjatoslav.eu]] + +* (document settings) :noexport: +** use dark style for TWBS-HTML exporter +#+HTML_HEAD: +#+HTML_HEAD: +#+HTML_HEAD: " +#+HTML_HEAD: +* Overview +Lossy image codec. Optimized for photos. I developed it to test out an +image compression ideas. + +I believe my [[id:1d917f74-e763-4a71-976e-4aa60732efa6][algorighm has interesting advantages.]] + +Below are original photo and the same image being compressed down to +~93 Kb and then decompressed. + +[[file:originalAndCompressed.png][file: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. +* Algorithm description ++ Color image is split into three separate channels: Y, U and V. + + Each channel is independently compressed. + ++ Single channel compression method: + + + Algorithm is inspired by [[https://en.wikipedia.org/wiki/Diamond-square_algorithm][diamond-square algorithm]] that is meant to + produce random heightmap/plasma effect. + + + 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. +** Algorighm advantages + :PROPERTIES: + :ID: 1d917f74-e763-4a71-976e-4aa60732efa6 + :END: ++ It can be applied to any amount of dimensions, even for sound and + volumetric data. + ++ Algorithm can operate in lossy and lossless mode. + ++ 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. + ++ Algorithm naturally supports variable resolution. That is: different + areas can be encoded with different resolutions / pixel densities. + ++ Fast: Very little computations per pixel. + +* TODO Things to improve +- Code documentation is weak. + +- Better sample applications needed: + - Commandline image conversion utility. + - Image viewer. + +- Add lossless support. + +- 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. -- 2.20.1