shithub: pdffs

Download patch

ref: 7c2e795156b5d969bdc807da910a35aa3afd315a
parent: ad1850d0f841bbd6245d5c09e3f6b750abf550f8
author: Sigrid Haflínudóttir <ftrvxmtrx@gmail.com>
date: Tue Sep 1 17:06:50 EDT 2020

leave dctd (jpeg) as is for now, ie just do a plain copy in the filter

--- a/filter.c
+++ b/filter.c
@@ -8,12 +8,19 @@
 int openFlate(Filter *f, Object *o);
 void closeFlate(Filter *f);
 
+static int
+fCopy(void *aux, Buffer *bi, Buffer *bo)
+{
+	bufput(bo, bi->b, bi->sz);
+	return 0;
+}
+
 static Filter filters[] = {
 	{"ASCII85Decode", nil, nil, nil},
 	{"ASCIIHexDecode", nil, nil, nil},
 	{"CCITTFaxDecode", nil, nil, nil},
 	{"CryptDecode", nil, nil, nil},
-	{"DCTDecode", nil, nil, nil},
+	{"DCTDecode", fCopy, nil, nil},
 	{"FlateDecode", fFlate, openFlate, closeFlate},
 	{"JBIG2Decode", nil, nil, nil},
 	{"JPXDecode", nil, nil, nil},