Commit Graph

205 Commits

Author SHA1 Message Date
nkbj
133174a6b1 Update various lists to match ExifTool version 10.28. 2016-09-29 03:37:38 +00:00
nkbj
52f3e100c2 Update various lists to match ExifTool version 10.27. 2016-09-24 00:13:38 +00:00
nkbj
d733056375 Fix issue #1215: Exif.CanonSi.SubjectDistance unit. 2016-09-18 02:30:19 +00:00
nkbj
7915183af7 Fix issue #1217: Missing values for Exif.CanonCs.ISOSpeed tag 0x0010. 2016-09-18 02:12:31 +00:00
nkbj
f260b163ad Update Canon and Nikon lens lists to match ExifTool version 10.26. 2016-09-17 01:55:10 +00:00
Robin Mills
5f9807cbef #1216. Rollback r4448/6/2/1 r4439/38 to restabilize test suite on trunk. r4449 is copy of r4448 to branches/develop 2016-08-30 16:05:45 +00:00
sridharb
48294e66c0 Summary: Restored jbeu's formatting 2016-08-26 06:27:52 +00:00
sridharb
8a8ec67136 This is mainly a fix for #1206, but also interprets missing Canon Exif
Tags in exiv2 with the help of Phil Harvey's exiftool (see
http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Canon.html).

Even with these changes (toward #1204 and #1205), exiv2 lags behind
exiftool in some areas of interpretation of Canon tags. Ideally, a
catch-up effort to bring the code in source: canonmn.cpp in line with
lib/Image/ExifTool/Canon.pm. v10.25 of exiftool was used as reference
for this change.

#1206 seeks to address the fact that when Canon does not have data for
certain tags, they use specific default values in those fields. These
default values need to be ignored and not displayed. This change
brings this feature to exiv2, something that already exiftool does.

With regards to implementation, the struct TagInfo in source: tags.hpp
is extended with four new fields.

The first field is a bool that if set to true (default false), denotes
that this field has ignorable default values.

The second field is the default value that needs to be ignored. This
can be of four types (String, Long, Float, Rational). These four types
were chosen as they had conversion functions in the Value class.

The third field is the comparison type (default equal_to). There are
six comparison types possible (equal_to, not_equal_to, less,
less_equal, greater, greater_equal). This is the comparison applied to
the value stored in the tag's field and the default value specified
above. For e.g. if the value in the tag Exif.CanonCs.RecordMode is -1,
then it needs to be ignored.

The fourth field is the data type (default Long). This could have been
guessed from the type of the second field, but that would necessitate
making this structure into a template calling for changes in multitude
of files.

Usage: In source: canonmn.cpp, several exif tags now have ignorable
default properties. I will list a few examples.

1. Exif.CanonCs.FocusMode:        TagInfo(0x0007, "FocusMode", N_("Focus Mode"), N_("Focus mode setting"), canonCsId, makerTags, signedShort, 1, EXV_PRINT_TAG(canonCsFocusMode)),

There are no changes - i.e. this is an example of how the TagInfo
structure was being populated.

2. Exif.CanonCs.RecordMode:        TagInfo(0x0009, "RecordMode", N_("Record Mode"), N_("Record mode setting"), canonCsId, makerTags, signedShort, 1, EXV_PRINT_TAG(canonCsRecordMode), true, s_1_),

Take a look at the two new arguments. The first one (true) specifies
that there is a default value that can be ignored. The second one s_1_
specifies the value (-1, in this case) to be ignored.

	const UShortValue CanonMakerNote::s_1_(65535, unsignedShort); // Till bug is resolved

Note s_1_ is temporarily having the value 65535 till #1203 that causes
signedShorts to be interpreted as unsignedShorts is resolved.


3. Exif.CanonSi.TargetAperture:         TagInfo(0x0004, "TargetAperture", N_("Target Aperture"), N_("Target Aperture"), canonSiId, makerTags, unsignedShort, 1, printSi0x0015, true, us0_, TagInfo::less_equal),

Note the third argument TagInfo::less_equal. This combined with the
second argument us0_ (the number 0) signifies that any values in this
tag that are less than or equal (<=) to 0 should be ignored.

4. 		TagInfo(0x0028, "ImageUniqueID", N_("Image Unique ID"), N_("Image Unique ID"), canonId, makerTags, asciiString, -1, printValue, true, s0x16_, TagInfo::equal_to, TagInfo::String),

The previous examples have all been of Long type. This shows a case
where the default value is a string.

	const AsciiValue CanonMakerNote::s0x16_("0000000000000000");

Once these tag values have been defined, the actual mechanics of
ignoring these default values happens in Image::exifData().

Before the exifData is returned, we loop through the data, ask the
data whether it needs to be ignored (which in turn checks its
underlying tagInfo and compares it with the default value, if
specified) and if so, deletes that element.

A compile-time switch called EXV_DONT_IGNORE_UNDEFINED which when set
to a non-zero value will cause the behavior to revert back to the
original where all values are reported irregardless of the fact that
they need to be ignored.
2016-08-26 05:36:05 +00:00
tbeu
136d517929 Update Canon FileInfo RawJpgSize to match ExifTool 2016-08-16 20:41:20 +00:00
tbeu
e5f142fab6 Update Canon CS Image stabilization to match ExifTool 2016-08-16 20:35:25 +00:00
tbeu
ffcb3f5002 Update Canon CS Exposure mode to match ExifTool 2016-08-16 20:28:56 +00:00
tbeu
e26650f409 Update Canon CS AF point to match ExifTool 2016-08-16 20:27:31 +00:00
tbeu
d888490a35 Update Canon CS Meeterimg mode to match ExifTool 2016-08-16 20:25:34 +00:00
tbeu
bde4fa8aa5 Update Canon CS Easy mode to match ExifTool 2016-08-16 20:22:53 +00:00
tbeu
e2bd73b1da Update Canon CS Image size to match ExifTool 2016-08-16 20:16:33 +00:00
tbeu
59d4bc6e02 Update Canon CS Focus mode to match ExifTool 2016-08-16 20:12:07 +00:00
tbeu
cbe1eafd28 Update Canon CS Drive mode to match ExifTool 2016-08-16 20:09:28 +00:00
tbeu
a564e084be Update Canon model ID to match ExifTool 2016-08-16 20:06:21 +00:00
Robin Mills
d8457b2b3f #1102. Correction to r4365. canonmn.cpp#1238 should not have been changed. Thanks to Sridhar for bringing this to my attention. 2016-08-14 05:43:21 +00:00
Robin Mills
1935eddeac #1202 Adding "Manual" Exif.CanonCs.FocusContinuous 2016-08-11 14:34:20 +00:00
nkbj
ecb9d84305 Issue #1197: Add support for Sigma 150-500mm on Canon with 1.4x TC. 2016-08-09 02:44:57 +00:00
nkbj
6011899bbf Update various lists to match ExifTool version 10.20. 2016-06-16 23:55:43 +00:00
nkbj
e155be6372 Update Canon lens list to match ExifTool version 10.19. 2016-06-02 02:51:51 +00:00
nkbj
26661a8702 Update lens lists to match ExifTool version 10.17. 2016-05-26 02:54:26 +00:00
Robin Mills
dbed6f857c #1034 Added exiv2 config file support for lens recognition. 2016-03-25 08:12:16 +00:00
Robin Mills
60b0b842cf #1170. Thank you, Marcus for reporting this and providing the test data. 2016-03-22 15:03:34 +00:00
nkbj
c26dd2091f Update Canon camera model list to match ExifTool version 10.13. 2016-03-13 03:32:28 +00:00
nkbj
8494fd61f3 Agreed with Phil Harvey (author of ExifTool) upon a nomenclature for Sigma lens families. 2016-03-12 04:32:50 +00:00
nkbj
36b42eabeb More consistency fixes. 2016-03-11 16:59:31 +00:00
nkbj
e948ccc449 Consistency fix. 2016-03-11 16:44:43 +00:00
nkbj
0cf3dc9e09 Add new lens: Sigma 50-100mm F1.8 DC HSM Art for Canon. 2016-03-11 16:27:32 +00:00
nkbj
ddccd1eafc Lens numbering fix. 2016-03-05 03:34:56 +00:00
nkbj
328ebcf462 Fix a couple of lens names to be consistent across lens mounts. 2016-03-05 03:23:36 +00:00
nkbj
e2f05aa19e Update various lists to match ExifTool version 10.12. 2016-03-04 17:24:19 +00:00
Robin Mills
cc0ec825ec #1166. Thank You, Phillippe for reporting this and providing a patch and test data. 2016-03-04 08:33:08 +00:00
Robin Mills
3daa8df380 #1167. Thank You, Philippe for the patch. No test file yet. 2016-03-04 08:10:18 +00:00
nkbj
41e27fa519 Update various lists to match ExifTool version 10.11. 2016-02-19 02:27:28 +00:00
Robin Mills
045f9ba328 #816. Correction to msvc buildbreaker in r4135 2015-12-21 17:23:17 +00:00
Robin Mills
ecedab80a5 #1140. Correction to r4132. Modified lens detection condition. 2015-12-20 17:30:41 +00:00
Robin Mills
b92dc7c8c9 #1140 Fix submitted. 2015-12-20 16:49:01 +00:00
nkbj
ce240e9043 Update various lists to match ExifTool version 10.07. 2015-11-27 02:45:58 +00:00
nkbj
314b142dc2 Update various lists to match ExifTool version 10.05. 2015-11-08 03:10:53 +00:00
nkbj
56d1071d57 Update various lists to match ExifTool version 10.03. 2015-10-24 00:06:06 +00:00
Robin Mills
cb48ead007 #1122 Thank You, Steve for the patch. 2015-09-30 08:21:37 +00:00
nkbj
0c02c73643 Update Canon lens list to match ExifTool version 10.02. 2015-09-20 04:53:37 +00:00
nkbj
1642a80600 Update Canon lens list to match ExifTool version 10.01. 2015-09-03 22:56:08 +00:00
nkbj
576c61ffd3 Update camera and lens lists to match ExifTool version 10.00. 2015-08-18 15:57:04 +00:00
nkbj
d1035b4b76 Update various lists to match ExifTool version 9.96. 2015-05-22 03:18:31 +00:00
nkbj
faf28b0fd1 Fix bug #1079: Rename Canon EF 50mm f/1.8 MkII. 2015-05-13 16:24:59 +00:00
Andreas Huggel
fd80993ab0 Updated copyright notice. 2015-05-02 11:55:40 +00:00