From bb4b895cb5938712bd09fbd2b5f49bea811d7551 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?= Date: Tue, 23 May 2023 02:09:15 +0200 Subject: Extract some full-size raw previews without LibRaw Not all image/x-nikon-nef will work like this, so don't claim their MIME type. --- tiff-tables.awk | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'tiff-tables.awk') diff --git a/tiff-tables.awk b/tiff-tables.awk index 2d93c36..29b462b 100755 --- a/tiff-tables.awk +++ b/tiff-tables.awk @@ -2,6 +2,22 @@ BEGIN { FS = ", *" print "// Generated by tiff-tables.awk. DO NOT MODIFY." + print "" + print "#ifndef TIFF_TABLES_CONSTANTS_ONLY" + print "#include " + print "#include " + print "" + print "struct tiff_value {" + print "\tconst char *name;" + print "\tuint16_t value;" + print "};" + print "" + print "struct tiff_entry {" + print "\tconst char *name;" + print "\tuint16_t tag;" + print "\tstruct tiff_value *values;" + print "};" + print "#endif" } { @@ -55,8 +71,10 @@ function flushvalues() { function flushsection() { if (section) { flushvalues() - print "};\n\n" allvalues "static struct tiff_entry " \ + print "};\n\n" allvalues "#ifndef TIFF_TABLES_CONSTANTS_ONLY" + print "static struct tiff_entry " \ sectionsnakecase "_entries[] = {" fields "\n\t{}\n};" + print "#endif" } } -- cgit v1.2.3