summaryrefslogtreecommitdiffstats
path: root/src/lib/jpeg.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/jpeg.c')
-rw-r--r--src/lib/jpeg.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/jpeg.c b/src/lib/jpeg.c
index a86ea06661e4..8d370ec67b19 100644
--- a/src/lib/jpeg.c
+++ b/src/lib/jpeg.c
@@ -257,6 +257,18 @@ static int dec_checkmarker(void)
return 0;
}
+void jpeg_fetch_size(unsigned char *buf, int *width, int *height)
+{
+ datap = buf;
+ getbyte();
+ getbyte();
+ readtables(M_SOF0);
+ getword();
+ getbyte();
+ *height = getword();
+ *width = getword();
+}
+
int jpeg_check_size(unsigned char *buf, int width, int height)
{
datap = buf;