summaryrefslogtreecommitdiff
path: root/Base
diff options
context:
space:
mode:
authorDevashish <devashishjaiswal86@gmail.com>2020-05-18 13:28:27 +0530
committerAndreas Kling <kling@serenityos.org>2020-06-23 13:51:19 +0200
commit8b71b839fab65fe5f6cb5c8afc0fbe3b05f72f98 (patch)
treeb977a47b13f2d799cf62436403ecc70de1c6050f /Base
parent10255bc5c6664ffcb8b496c34a7c34b56d898138 (diff)
downloadserenity-8b71b839fab65fe5f6cb5c8afc0fbe3b05f72f98.zip
LibGfx+LibWeb: Add JPEG decoder and integrate with LibWeb
This patch adds support for JPEG decoding. The JPEG decoder is capable of handling standard 2x1 horizontal, 2x1 vertical and quartered chroma subsampling. The implemented Inverse DCT performs with a decent speed. As of interchange formats, since we tend to ignore the metadata in APPn markers, the decoder can handle any format compatible with JFIF, which includes EXIFs and sometimes WebMs too. The decoder does not support progressive JPEGs yet.
Diffstat (limited to 'Base')
-rw-r--r--Base/res/html/misc/jpg.html23
-rw-r--r--Base/res/html/misc/jpgsuite_files/chroma-quartered-lena.jpgbin0 -> 25019 bytes
-rw-r--r--Base/res/html/misc/jpgsuite_files/horizontally-halved-lena.jpgbin0 -> 29282 bytes
-rw-r--r--Base/res/html/misc/jpgsuite_files/non-subsampled-lena.jpgbin0 -> 35193 bytes
-rw-r--r--Base/res/html/misc/jpgsuite_files/oh-lena.jpgbin0 -> 155145 bytes
-rw-r--r--Base/res/html/misc/jpgsuite_files/vertically-halved-lena.jpgbin0 -> 28566 bytes
-rw-r--r--Base/res/html/misc/welcome.html1
7 files changed, 24 insertions, 0 deletions
diff --git a/Base/res/html/misc/jpg.html b/Base/res/html/misc/jpg.html
new file mode 100644
index 0000000000..11f199eabc
--- /dev/null
+++ b/Base/res/html/misc/jpg.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <title>Pretty JPEG Pictures</title>
+</head>
+<body>
+<div>
+ <h3>Non-subsampled Lena</h3> <br>
+ <img alt="lena" src="jpgsuite_files/non-subsampled-lena.jpg"/> <br>
+ <h3>Chroma Horizontally Halved Lena</h3> <br>
+ <img alt="lena" src="jpgsuite_files/horizontally-halved-lena.jpg"/> <br>
+ <h3>Chroma Vertically Halved Lena</h3> <br>
+ <img alt="lena" src="jpgsuite_files/vertically-halved-lena.jpg"/> <br>
+ <h3>Chroma Quartered Lena</h3> <br>
+ <img alt="lena" src="jpgsuite_files/chroma-quartered-lena.jpg"/><br>
+</div>
+<div>
+ <h3>Oh Lena!</h3> <br>
+ <img alt="lena" src="jpgsuite_files/oh-lena.jpg"/>
+</div>
+</body>
+</html>
diff --git a/Base/res/html/misc/jpgsuite_files/chroma-quartered-lena.jpg b/Base/res/html/misc/jpgsuite_files/chroma-quartered-lena.jpg
new file mode 100644
index 0000000000..08b6a82c71
--- /dev/null
+++ b/Base/res/html/misc/jpgsuite_files/chroma-quartered-lena.jpg
Binary files differ
diff --git a/Base/res/html/misc/jpgsuite_files/horizontally-halved-lena.jpg b/Base/res/html/misc/jpgsuite_files/horizontally-halved-lena.jpg
new file mode 100644
index 0000000000..0f12c6af3e
--- /dev/null
+++ b/Base/res/html/misc/jpgsuite_files/horizontally-halved-lena.jpg
Binary files differ
diff --git a/Base/res/html/misc/jpgsuite_files/non-subsampled-lena.jpg b/Base/res/html/misc/jpgsuite_files/non-subsampled-lena.jpg
new file mode 100644
index 0000000000..45928b3351
--- /dev/null
+++ b/Base/res/html/misc/jpgsuite_files/non-subsampled-lena.jpg
Binary files differ
diff --git a/Base/res/html/misc/jpgsuite_files/oh-lena.jpg b/Base/res/html/misc/jpgsuite_files/oh-lena.jpg
new file mode 100644
index 0000000000..053887a9f7
--- /dev/null
+++ b/Base/res/html/misc/jpgsuite_files/oh-lena.jpg
Binary files differ
diff --git a/Base/res/html/misc/jpgsuite_files/vertically-halved-lena.jpg b/Base/res/html/misc/jpgsuite_files/vertically-halved-lena.jpg
new file mode 100644
index 0000000000..4c11be1352
--- /dev/null
+++ b/Base/res/html/misc/jpgsuite_files/vertically-halved-lena.jpg
Binary files differ
diff --git a/Base/res/html/misc/welcome.html b/Base/res/html/misc/welcome.html
index 8f5ddcfc32..a4294f1605 100644
--- a/Base/res/html/misc/welcome.html
+++ b/Base/res/html/misc/welcome.html
@@ -34,6 +34,7 @@ span#ua {
<li><a href="iframe.html">iframe</a></li>
<li><a href="many-buggies.html">many buggies</a></li>
<li><a href="bmpsuite.html">BMP test suite</a></li>
+ <li><a href="jpg.html">JPG Images</a></li>
<li><a href="palette.html">system palette color css extension</a></li>
<li><a href="inline-block-link.html">link inside display: inline-block</a></li>
<li><a href="set-interval.html">setInterval() test</a></li>