Date: Mon, 18 Dec 2006 09:57:11 +0300 (MSK) From: Alex Kapranoff <alex@kapranoff.ru> To: FreeBSD-gnats-submit@FreeBSD.org Cc: nivo+kw+ports.bfa274@is-root.com Subject: ports/106852: [patch] Teach graphics/jhead about ISO in newer Nikon cameras Message-ID: <20061218065711.AEA991F74EB@kapranoff.ru> Resent-Message-ID: <200612180740.kBI7eGwT068833@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061218065711.AEA991F74EB>