127 Commits (925fede11365c1c3ed18f3c78ba2ee1a60321e25)

Author SHA1 Message Date
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 9 years ago
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.
9 years ago
draekko 6f7b3ba8f7 #1199 removed convenience converstion for iptc to xmp, apps should handle it directly since webp doesnt support iptc. 9 years ago
Robin Mills 104eb6b7fe #1199 Fixing MSVC build breaker involving long/uint64_t conflict. Minor changes to behaviour of Internal::binaryToHex() 9 years ago
draekko fe4f6f07f1 #1199 update to binaryToHex, should remove compile warnings and fix extra space padding. 9 years ago
Robin Mills b09c2049a6 #1199 Fixing build breaker introduced by r4369 9 years ago
draekko bcaa22ae6f #1199 removed warnings in stringToHex, enabled iptc support for WebPImage. 9 years ago
draekko 71fd0ae96e #1199 (as was discussed) moved WebPImage::debugPrintHex to Internal::binaryToHex 9 years ago
draekko 85cc2f745d #1199 Fixed crash with iptc by disabling it, updated decodeChunk to do better header checks, added hexdump function. 9 years ago
Robin Mills b3f107bd8c #1199 WebP Support (work in progress). Thank You to Ben for the patch. Thanks to Gilles for encouragement. 9 years ago
Robin Mills 664af57e10 #1034 Added samples/toexv This is a first step to write exif metadata to memory to send to a web service. 9 years ago
Robin Mills 06eabfdd88 #1074. jpgimage.cpp ICC support (Work in Progress) 9 years ago
Robin Mills e7b804f3f5 #1108 Refactored static indent(depth) from png/tiff/jpeg to Internal::indent(depth) 9 years ago
Robin Mills 6e19d043ef #1108 Added IPTC parser for tiff. 9 years ago
Robin Mills fd5e983746 r1108 Recursively dump an image (exiv2 -pR file...) 10 years ago
Robin Mills db4be31b6f #1130. Thank You Jakub for reporting this. 10 years ago
Andreas Huggel a57317f685 Some API policing 10 years ago
Andreas Huggel 006625e116 Removed helper functions binaryToString() and stringFormat() from the API and from class Image and made them internal helpers. Renamed type printStructureOption_e to PrintStructureOption to conform with the common naming convention. 10 years ago
Robin Mills ee1ca29d09 #1073 test/tiff-test.sh rewritten to no longer require external utility exifprobe 10 years ago
Andreas Huggel fd80993ab0 Updated copyright notice. 10 years ago
Robin Mills 2712082555 #922 Rollback r3771. Very troublesome feature. bugfixed #922 is looping Linux. PNG Has endian issues on MM/PowerPC 10 years ago
Robin Mills 2f375e8f02 #922. Adding to the test suite. 10 years ago
Robin Mills f343a21e21 #922. Mac fix for Image::stringFormat() 10 years ago
Robin Mills b2be263206 #922 Fixing Image::formatString() on Windows 10 years ago
Robin Mills 5aec2c4957 #1069. Make video a build option (msvc/autotools/cmake). Default is not to build video or webready. 10 years ago
Robin Mills 84bf485ebe #922. Fixing -pS and -pX on MSVC. 10 years ago
Robin Mills b1ad7a925c #922. Fixing MSVC warnings. 10 years ago
Robin Mills fd1852da84 #922. Fix Linux build breaker and MSVC compilation warnings. 10 years ago
Robin Mills 40ffba6033 #922 -pS and -pX support for TIFF. Added formatters to Image class and use them from {jpg/png/tiff}image.cpp 10 years ago
Robin Mills f6c79a0d20 #922. Work in progress on options -pS and -pX 10 years ago
Robin Mills 6c113871ef #922. Added options -pS and -pX to exiv2(.exe). Still to deal with -dI 10 years ago
Robin Mills d393b0fa7e trunk: exiv2 v0.25 11 years ago
Robin Mills 27ef590773 Roll-back for 3355 (GSoC2013 video write code). Regrettably, this appears to cause all MSVC build to fail our test harness. I'll deal with the video13 code in a different branch. 11 years ago
Robin Mills 66e473db32 GSoC2013 Video Write Code. Thank You, Mahesh for a lot of hard work. And Thanks to Abhinav for mentoring. Great Job, Guys. 11 years ago
Robin Mills 4e530fbce0 Bumping the copyright notice again. (re-doing 3089 without breaking the build!) 12 years ago
Robin Mills a297d2b69e Rollback 3089 - somehow it's broken the build! 12 years ago
Robin Mills da1ed8c536 Bumping the copyright notice in src &samples from 2012 to 2013 12 years ago
Abhinav Badola 13d25df07d Corrected some registry entries. Corrected the mode of filetypes specified. 12 years ago
Andreas Huggel dd34cda512 #635: Updated image registry for CR2 write support. 13 years ago
Andreas Huggel 9b131f3c61 Merge branch 'gsoc2012' 13 years ago
Andreas Huggel 0d397b95c7 Updated copyright message for 2012. 13 years ago
vog 3342822ad7 Provide generic mechanism for native previews 14 years ago
vog e8c8b1a173 #689: Fixed regression: Ensure that isEpsType() does't disturb other file formats, and that none of the other file formats disturbs isEpsType() 14 years ago
vog de48225d9b #689: provide support for EPS files
EPS is added to the front of the registry to ensure that very small
EPS files will be detected.

This implementation refuses to deal with "read-only XMP" as well
as "%%Include..." DSC comments, because it is unclear how to handle
those properly. If one of these special cases occur, a warning will
be emitted which encourages the user to provide a real-world EPS
file to us.
14 years ago
Andreas Huggel 373455c0ac #761: Changed Image::setMetadata() to check if writing is supported (Matthias Baas). 15 years ago
Andreas Huggel 7770151915 Updated Copyright message for 2011. 15 years ago
Andreas Huggel 6a4b7afba2 Synchronized wiki and image registry. 15 years ago
Andreas Huggel 06ce0d18b6 - Introduced exiv2.hpp as a wrapper to include all Exiv2 objects. (Renamed existing exiv2.hpp to exiv2app.hpp)
- Changed Sony/Minolta pretty-print function to print EV value
- Renamed rcsid.hpp to rcsid_int.hpp, do not publish it anymore
15 years ago
Andreas Huggel 6d496a4888 Updated Copyright notice for 2010. 15 years ago
Andreas Huggel 9b4f4f84d6 MinGW and MSVC fixes. 16 years ago