aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/jhead
diff options
context:
space:
mode:
authorgabor <gabor@FreeBSD.org>2006-12-28 21:59:00 +0800
committergabor <gabor@FreeBSD.org>2006-12-28 21:59:00 +0800
commitcd28b2a6e599b0f89772bdfbcff42b7fd02e344d (patch)
tree467ed92c2ccb53ce9967a3525c987fc074141d5f /graphics/jhead
parent0c30fc0a5778c05bd782fdbaba8e8717c455f602 (diff)
downloadfreebsd-ports-graphics-cd28b2a6e599b0f89772bdfbcff42b7fd02e344d.tar.gz
freebsd-ports-graphics-cd28b2a6e599b0f89772bdfbcff42b7fd02e344d.tar.zst
freebsd-ports-graphics-cd28b2a6e599b0f89772bdfbcff42b7fd02e344d.zip
- Add ISO support for newer Nikon cameras
PR: ports/106852 Submitted by: Alex Kapranoff <alex@kapranoff.ru> Approved by: erwin (mentor), Nils Vogels <nivo+kw+ports.bfa274@is-root.com> (maintainer)
Diffstat (limited to 'graphics/jhead')
-rw-r--r--graphics/jhead/Makefile1
-rw-r--r--graphics/jhead/files/patch-makernote.c39
2 files changed, 40 insertions, 0 deletions
diff --git a/graphics/jhead/Makefile b/graphics/jhead/Makefile
index d03aee657eb..b67c3c0a273 100644
--- a/graphics/jhead/Makefile
+++ b/graphics/jhead/Makefile
@@ -7,6 +7,7 @@
PORTNAME= jhead
PORTVERSION= 2.6
+PORTREVISION= 1
CATEGORIES= graphics
MASTER_SITES= http://www.sentex.net/~mwandel/jhead/
diff --git a/graphics/jhead/files/patch-makernote.c b/graphics/jhead/files/patch-makernote.c
new file mode 100644
index 00000000000..79f77827842
--- /dev/null
+++ b/graphics/jhead/files/patch-makernote.c
@@ -0,0 +1,39 @@
+--- jhead-2.60.orig/makernote.c 2006-05-18 00:48:56.000000000 +0400
++++ makernote.c 2006-12-18 09:57:32.000000000 +0300
+@@ -147,6 +147,27 @@
+ }
+ }
+ }
++//
++//--------------------------------------------------------------------------
++// Process exif format directory, as used by Nikon maker note
++//--------------------------------------------------------------------------
++void ProcessNikonMakerNoteDir(unsigned char *MakerNote)
++{
++ unsigned short iso;
++
++ if (DumpExifMap){
++ printf("(Nikon makernote)\n");
++ }
++
++ iso = Get16u(MakerNote + 20 + 12 + 10); // 20 bytes MakerNote ID ("Nikon" + padding), then TIFF header
++
++ if (ShowTags){
++ printf("ISO derived from Nikon MakerNote: %d\n",iso);
++ }
++
++ if (!ImageInfo.ISOequivalent)
++ ImageInfo.ISOequivalent = iso;
++}
+
+ //--------------------------------------------------------------------------
+ // Show generic maker note - just hex bytes.
+@@ -174,6 +195,8 @@
+ {
+ if (strstr(ImageInfo.CameraMake, "Canon")){
+ ProcessCanonMakerNoteDir(ValuePtr, OffsetBase, ExifLength);
++ }else if (strncmp((char *)ValuePtr, "Nikon", 5) == 0){
++ ProcessNikonMakerNoteDir(ValuePtr);
+ }else{
+ if (ShowTags){
+ ShowMakerNoteGeneric(ValuePtr, ByteCount);