summaryrefslogtreecommitdiff
path: root/Libraries
diff options
context:
space:
mode:
authordevashish <devashishjaiswal86@gmail.com>2020-06-28 20:20:45 +0530
committerAndreas Kling <kling@serenityos.org>2020-06-28 16:56:59 +0200
commit4924b86b2aa30ff933ae782dfe0c57ce84459df6 (patch)
tree4145cfcc342c58009721ec496aa797dcd7ac41b4 /Libraries
parent2df69317f13cefd3452144bd0d266eca7dae4e9a (diff)
downloadserenity-4924b86b2aa30ff933ae782dfe0c57ce84459df6.zip
LibGfx+JPGLoader: Print failure message for progressive JPEGs
Diffstat (limited to 'Libraries')
-rw-r--r--Libraries/LibGfx/JPGLoader.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Libraries/LibGfx/JPGLoader.cpp b/Libraries/LibGfx/JPGLoader.cpp
index d9419d8991..e5ea3ad1bb 100644
--- a/Libraries/LibGfx/JPGLoader.cpp
+++ b/Libraries/LibGfx/JPGLoader.cpp
@@ -90,6 +90,7 @@
#define JPG_EOI 0xFFD9
#define JPG_RST 0XFFDD
#define JPG_SOF0 0XFFC0
+#define JPG_SOF2 0xFFC2
#define JPG_SOI 0XFFD8
#define JPG_SOS 0XFFDA
#define JPG_COM 0xFFFE
@@ -438,6 +439,9 @@ static inline bool is_valid_marker(const Marker marker)
case JPG_SOI:
case JPG_SOS:
return true;
+ case JPG_SOF2:
+ dbg() << "Progressive JPEGs are not supported yet. Decoder will fail!";
+ return false;
default:
return false;
}