Re: [patch] Pentax raw file suport

"Petr Kovar" <[email protected]> Wed, 8 Nov 2006 10:44:42 +0100
Newsgroups gmane.comp.gnome.apps.gqview.devel
Message-ID <[email protected]>
> Is this more or less just an exact copy from the nikon code? If so then
> there is no need to duplicate it out to another file (it can always be done
> in the future). Just add the necessary #define to format_nikon.h and use
> the nikon parser function.
Yes, it is exact copy from the nikon code. I just renamed nikon to pentax :-)
So, I did the patch more slim.

> Until I see an example .pef file, I can't argue whether MAGIC is really
> necessary or if FORMAT_RAW_MATCH_MAKE would work (seeing as it's a TIFF
> file the magic string could move around in different camera models).
You are right. I tested it and it works nicely with FORMAT_RAW_MATCH_TIFF_MAKE

Two examples are at http://leia.ics.muni.cz/~petr/pef/

Regards.
--
Petr Kovar <[email protected]>

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

_______________________________________________
Gqview-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gqview-devel
gqview-2.1.4-pentax-2.patch (text/x-patch, 1.5 KB)
diff -ruN gqview-2.1.4/src/filelist.c gqview-2.1.4-pentax-2/src/filelist.c
--- gqview-2.1.4/src/filelist.c	2006-10-19 11:50:36.000000000 +0200
+++ gqview-2.1.4-pentax-2/src/filelist.c	2006-11-08 08:32:25.000000000 +0100
@@ -215,6 +215,7 @@
 	filter_add_if_missing("crw", "Canon raw format", ".crw;.cr2", TRUE);
 	filter_add_if_missing("raf", "Fujifilm raw format", ".raf", TRUE);
 	filter_add_if_missing("nef", "Nikon raw format", ".nef", TRUE);
+	filter_add_if_missing("pef", "Pentax raw format", ".pef", TRUE);
 }
 
 static GList *filter_to_list(const gchar *extensions)
diff -ruN gqview-2.1.4/src/format_nikon.h gqview-2.1.4-pentax-2/src/format_nikon.h
--- gqview-2.1.4/src/format_nikon.h	2005-06-10 03:34:25.000000000 +0200
+++ gqview-2.1.4-pentax-2/src/format_nikon.h	2006-11-08 08:34:16.000000000 +0100
@@ -20,6 +20,10 @@
 			   FORMAT_RAW_MATCH_TIFF_MAKE, 0, "NIKON CORPORATION", 17, \
 			   "Nikon raw", format_nikon_raw }
 
+#define FORMAT_RAW_PENTAX { "pef", \
+			   FORMAT_RAW_MATCH_TIFF_MAKE, 0, "PENTAX Corporation", 18, \
+			   "Pentax raw", format_nikon_raw }
+
 
 gint format_nikon_makernote(ExifData *exif, unsigned char *tiff, guint offset,
 			    guint size, ExifByteOrder bo);
diff -ruN gqview-2.1.4/src/format_raw.c gqview-2.1.4-pentax-2/src/format_raw.c
--- gqview-2.1.4/src/format_raw.c	2005-06-13 01:25:08.000000000 +0200
+++ gqview-2.1.4-pentax-2/src/format_raw.c	2006-11-08 08:32:25.000000000 +0100
@@ -53,6 +53,7 @@
 	FORMAT_RAW_CANON,
 	FORMAT_RAW_FUJI,
 	FORMAT_RAW_NIKON,
+	FORMAT_RAW_PENTAX,
 	{ NULL, 0, 0, NULL, 0, NULL, NULL }
 };