ports/106852: [patch] Teach graphics/jhead about ISO in newer Nikon cameras
Alex Kapranoff
alex at kapranoff.ru
Mon Dec 18 07:40:17 UTC 2006
>Number: 106852
>Category: ports
>Synopsis: [patch] Teach graphics/jhead about ISO in newer Nikon cameras
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Mon Dec 18 07:40:15 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: Alex Kapranoff
>Release: FreeBSD 4.11-RELEASE-patched-p2 i386
>Organization:
Inner Mongolia
>Environment:
System: FreeBSD d485.agava.net 4.11-RELEASE-patched-p2 FreeBSD 4.11-RELEASE-patched-p2 #0: Thu Apr 14 08:48:30 GMT 2005 root at zombie3.domain:/usr/obj/usr/src/sys/GENERIC i386
>Description:
>How-To-Repeat:
>Fix:
Port maintainer CC-ed.
diff -ruN /usr/ports/graphics/jhead/Makefile jhead/Makefile
--- /usr/ports/graphics/jhead/Makefile Tue Jul 4 17:32:19 2006
+++ jhead/Makefile Mon Dec 18 09:54:11 2006
@@ -7,6 +7,7 @@
PORTNAME= jhead
PORTVERSION= 2.6
+PORTREVISION= 1
CATEGORIES= graphics
MASTER_SITES= http://www.sentex.net/~mwandel/jhead/
diff -ruN /usr/ports/graphics/jhead/files/patch-makernote.c jhead/files/patch-makernote.c
--- /usr/ports/graphics/jhead/files/patch-makernote.c Thu Jan 1 03:00:00 1970
+++ jhead/files/patch-makernote.c Mon Dec 18 09:52:28 2006
@@ -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);
>Release-Note:
>Audit-Trail:
>Unformatted:
Severity: non-critical
More information about the freebsd-ports-bugs
mailing list