Changed class Entry to transform comment type on the fly. Fixes bug #445.

v0.27.3
Andreas Huggel 20 years ago
parent fd2b211222
commit 0398735e80

@ -119,6 +119,15 @@ namespace Exiv2 {
return *this;
} // Entry::operator=
uint16_t Entry::type() const
{
// Hack: On the fly type conversion for Exif.Photo.UserComment
if (tag_ == 0x9286 && ifdId_ == exifIfdId && type_ == undefined) {
return comment;
}
return type_;
}
void Entry::setValue(uint32_t data, ByteOrder byteOrder)
{
if (pData_ == 0 || size_ < 4) {

@ -182,7 +182,7 @@ namespace Exiv2 {
//! Return the tag
uint16_t tag() const { return tag_; }
//! Return the type id.
uint16_t type() const { return type_; }
uint16_t type() const;
//! Return the name of the type
const char* typeName() const
{ return TypeInfo::typeName(TypeId(type_)); }

@ -204,10 +204,15 @@ void exifPrint(const ExifData& exifData)
{
ExifData::const_iterator i = exifData.begin();
for (; i != exifData.end(); ++i) {
std::cout << std::setw(53) << std::setfill(' ') << std::left
std::cout << std::setw(44) << std::setfill(' ') << std::left
<< i->key() << " "
<< "0x" << std::setw(4) << std::setfill('0') << std::right
<< std::hex << i->tag() << " "
<< std::setw(9) << std::setfill(' ') << std::left
<< i->typeName() << " "
<< std::dec << std::setw(3)
<< std::setfill(' ') << std::right
<< i->count() << " "
<< std::dec << i->value()
<< "\n";
}

@ -41,6 +41,11 @@ num=444
filename=`prep_file $num`
$binpath/exiv2 -pi $filename
num=445
filename=`prep_file $num`
$binpath/exiv2 -v -M'set Exif.Photo.UserComment A comment' $filename
$binpath/exiv2 -pt $filename
) > $results 2>&1
diff -q $diffargs $results $good

@ -76,3 +76,128 @@ Iptc.Application2.SuppCategory String 8 portrait
Iptc.Application2.Caption String 18 Witty caption here
Iptc.Application2.Keywords String 3 ize
Iptc.Application2.0x007b String 4 n123
------> Bug 445 <-------
File 1/1: exiv2-bug445.jpg
Set Exif.Photo.UserComment "A comment" (Comment)
Exif.Image.Make Ascii 6 Canon
Exif.Image.Model Ascii 20 Canon PowerShot S40
Exif.Image.Orientation Short 1 top, left
Exif.Image.XResolution Rational 1 180
Exif.Image.YResolution Rational 1 180
Exif.Image.ResolutionUnit Short 1 inch
Exif.Image.DateTime Ascii 20 2003:12:14 12:01:44
Exif.Image.YCbCrPositioning Short 1 Centered
Exif.Image.ExifTag Long 1 196
Exif.Photo.ExposureTime Rational 1 1/500 s
Exif.Photo.FNumber Rational 1 F4.9
Exif.Photo.ExifVersion Undefined 4 48 50 50 48
Exif.Photo.DateTimeOriginal Ascii 20 2003:12:14 12:01:44
Exif.Photo.DateTimeDigitized Ascii 20 2003:12:14 12:01:44
Exif.Photo.ComponentsConfiguration Undefined 4 YCbCr
Exif.Photo.CompressedBitsPerPixel Rational 1 5
Exif.Photo.ShutterSpeedValue SRational 1 1/501 s
Exif.Photo.ApertureValue Rational 1 F5
Exif.Photo.ExposureBiasValue SRational 1 0
Exif.Photo.MaxApertureValue Rational 1 F2.8
Exif.Photo.MeteringMode Short 1 Center weighted
Exif.Photo.Flash Short 1 No, auto
Exif.Photo.FocalLength Rational 1 21.3 mm
Exif.Photo.UserComment Undefined 264 A comment
Exif.Photo.FlashpixVersion Undefined 4 48 49 48 48
Exif.Photo.ColorSpace Short 1 sRGB
Exif.Photo.PixelXDimension Short 1 2272
Exif.Photo.PixelYDimension Short 1 1704
Exif.Photo.InteroperabilityTag Long 1 1416
Exif.Photo.FocalPlaneXResolution Rational 1 8114.29
Exif.Photo.FocalPlaneYResolution Rational 1 8114.29
Exif.Photo.FocalPlaneResolutionUnit Short 1 inch
Exif.Photo.SensingMethod Short 1 One-chip color area
Exif.Photo.FileSource Undefined 1 Digital still camera
Exif.Photo.CustomRendered Short 1 0
Exif.Photo.ExposureMode Short 1 Auto
Exif.Photo.WhiteBalance Short 1 Auto
Exif.Photo.DigitalZoomRatio Rational 1 1.0
Exif.Photo.SceneCaptureType Short 1 Standard
Exif.Canon.0x0002 Short 4 2 682 286 215
Exif.Canon.0x0003 Short 4 0 0 0 0
Exif.Canon.0x0000 Short 6 0 0 0 0 0 0
Exif.Canon.0x0000 Short 4 0 0 0 0
Exif.Canon.ImageType Ascii 32 IMG:PowerShot S40 JPEG
Exif.Canon.FirmwareVersion Ascii 24 Firmware Version 1.10
Exif.Canon.ImageNumber Long 1 117-1771
Exif.Canon.OwnerName Ascii 32 Andreas Huggel
Exif.Canon.0x0010 Long 1 17891328
Exif.Canon.0x000d Short 21 42 3 32769 378 32769 0 0 0 259 2 0 10 0 0 0 57 198 5 0 0 0
Exif.CanonCs1.Macro Short 1 Off
Exif.CanonCs1.Selftimer Short 1 Off
Exif.CanonCs1.Quality Short 1 Superfine
Exif.CanonCs1.FlashMode Short 1 Auto
Exif.CanonCs1.DriveMode Short 1 Single / timer
Exif.CanonCs1.0x0006 Short 1 0
Exif.CanonCs1.FocusMode Short 1 Single
Exif.CanonCs1.0x0008 Short 1 0
Exif.CanonCs1.0x0009 Short 1 1
Exif.CanonCs1.ImageSize Short 1 Large
Exif.CanonCs1.EasyMode Short 1 Manual
Exif.CanonCs1.DigitalZoom Short 1 None
Exif.CanonCs1.Contrast Short 1 Normal
Exif.CanonCs1.Saturation Short 1 Normal
Exif.CanonCs1.Sharpness Short 1 Normal
Exif.CanonCs1.ISOSpeed Short 1 100
Exif.CanonCs1.MeteringMode Short 1 Center weighted
Exif.CanonCs1.FocusType Short 1 Auto
Exif.CanonCs1.AFPoint Short 1 Center
Exif.CanonCs1.ExposureProgram Short 1 Program
Exif.CanonCs1.0x0015 Short 1 65535
Exif.CanonCs1.0x0016 Short 1 65535
Exif.CanonCs1.Lens Short 3 7.1 - 21.3 mm
Exif.CanonCs1.0x001a Short 1 149
Exif.CanonCs1.0x001b Short 1 192
Exif.CanonCs1.FlashActivity Short 1 Did not fire
Exif.CanonCs1.FlashDetails Short 1
Exif.CanonCs1.0x001e Short 1 0
Exif.CanonCs1.0x001f Short 1 0
Exif.CanonCs1.FocusMode Short 1 Single
Exif.CanonCs1.0x0021 Short 1 0
Exif.CanonCs1.0x0022 Short 1 65535
Exif.CanonCs1.0x0023 Short 1 49
Exif.CanonCs1.0x0024 Short 1 2272
Exif.CanonCs1.0x0025 Short 1 2272
Exif.CanonCs1.0x0026 Short 1 0
Exif.CanonCs1.0x0027 Short 1 1
Exif.CanonCs2.0x0001 Short 1 0
Exif.CanonCs2.ISOSpeed Short 1 100
Exif.CanonCs2.0x0003 Short 1 276
Exif.CanonCs2.TargetAperture Short 1 F5
Exif.CanonCs2.TargetShutterSpeed Short 1 1/501 s
Exif.CanonCs2.0x0006 Short 1 0
Exif.CanonCs2.WhiteBalance Short 1 Auto
Exif.CanonCs2.0x0008 Short 1 0
Exif.CanonCs2.Sequence Short 1 0
Exif.CanonCs2.0x000a Short 1 6
Exif.CanonCs2.0x000b Short 1 0
Exif.CanonCs2.0x000c Short 1 0
Exif.CanonCs2.0x000d Short 1 0
Exif.CanonCs2.AFPointUsed Short 1 3 focus points; center used
Exif.CanonCs2.FlashBias Short 1 0 EV
Exif.CanonCs2.0x0010 Short 1 0
Exif.CanonCs2.0x0011 Short 1 0
Exif.CanonCs2.0x0012 Short 1 1
Exif.CanonCs2.SubjectDistance Short 1 782
Exif.CanonCs2.0x0014 Short 1 0
Exif.CanonCs2.ApertureValue Short 1 F5
Exif.CanonCs2.ShutterSpeedValue Short 1 1/523 s
Exif.CanonCs2.0x0017 Short 1 0
Exif.CanonCs2.0x0018 Short 1 0
Exif.CanonCs2.0x0019 Short 1 0
Exif.CanonCs2.0x001a Short 1 250
Exif.Iop.InteroperabilityIndex Ascii 4 R98
Exif.Iop.InteroperabilityVersion Undefined 4 48 49 48 48
Exif.Iop.RelatedImageWidth Short 1 2272
Exif.Iop.RelatedImageLength Short 1 1704
Exif.Thumbnail.Compression Short 1 JPEG
Exif.Thumbnail.XResolution Rational 1 180
Exif.Thumbnail.YResolution Rational 1 180
Exif.Thumbnail.ResolutionUnit Short 1 inch
Exif.Thumbnail.JPEGInterchangeFormat Long 1 0
Exif.Thumbnail.JPEGInterchangeFormatLength Long 1 5448

@ -189,7 +189,7 @@ Exif.Photo.MaxApertureValue 0x9205 Exif Rational 1
Exif.Photo.MeteringMode 0x9207 Exif Short 1 1
Exif.Photo.Flash 0x9209 Exif Short 1 24
Exif.Photo.FocalLength 0x920a Exif Rational 1 682/32
Exif.Photo.UserComment 0x9286 Exif Undefined 264 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Exif.Photo.UserComment 0x9286 Exif Undefined 264
Exif.Photo.FlashpixVersion 0xa000 Exif Undefined 4 48 49 48 48
Exif.Photo.ColorSpace 0xa001 Exif Short 1 1
Exif.Photo.PixelXDimension 0xa002 Exif Short 1 2272
@ -313,7 +313,7 @@ Exif.Photo.MaxApertureValue 0x9205 Exif Rational 1
Exif.Photo.MeteringMode 0x9207 Exif Short 6 1 2 3 4 5 6
Exif.Photo.Flash 0x9209 Exif Short 1 24
Exif.Photo.FocalLength 0x920a Exif Rational 1 682/32
Exif.Photo.UserComment 0x9286 Exif Undefined 264 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Exif.Photo.UserComment 0x9286 Exif Undefined 264
Exif.Photo.FlashpixVersion 0xa000 Exif Undefined 4 48 49 48 48
Exif.Photo.ColorSpace 0xa001 Exif Short 1 1
Exif.Photo.PixelXDimension 0xa002 Exif Short 1 2272
@ -438,7 +438,7 @@ Exif.Photo.MaxApertureValue 0x9205 Exif Rational 1
Exif.Photo.MeteringMode 0x9207 Exif Short 1 1
Exif.Photo.Flash 0x9209 Exif Short 1 24
Exif.Photo.FocalLength 0x920a Exif Rational 1 682/32
Exif.Photo.UserComment 0x9286 Exif Undefined 264 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Exif.Photo.UserComment 0x9286 Exif Undefined 264
Exif.Photo.FlashpixVersion 0xa000 Exif Undefined 4 48 49 48 48
Exif.Photo.ColorSpace 0xa001 Exif Short 1 1
Exif.Photo.PixelXDimension 0xa002 Exif Short 1 2272
@ -562,7 +562,7 @@ Exif.Photo.MaxApertureValue 0x9205 Exif Rational 1
Exif.Photo.MeteringMode 0x9207 Exif Short 1 1
Exif.Photo.Flash 0x9209 Exif Short 1 24
Exif.Photo.FocalLength 0x920a Exif Rational 1 682/32
Exif.Photo.UserComment 0x9286 Exif Undefined 264 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Exif.Photo.UserComment 0x9286 Exif Undefined 264
Exif.Photo.FlashpixVersion 0xa000 Exif Undefined 4 48 49 48 48
Exif.Photo.ColorSpace 0xa001 Exif Short 1 1
Exif.Photo.PixelXDimension 0xa002 Exif Short 1 2272
@ -690,7 +690,7 @@ Exif.Photo.MeteringMode 0x9207 Exif Short 1
Exif.Photo.LightSource 0x9208 Exif Short 1 0
Exif.Photo.Flash 0x9209 Exif Short 1 0
Exif.Photo.FocalLength 0x920a Exif Rational 1 500/10
Exif.Photo.UserComment 0x9286 Exif Undefined 44 65 83 67 73 73 0 0 0 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
Exif.Photo.UserComment 0x9286 Exif Undefined 44 charset="Ascii"
Exif.Photo.SubSecTime 0x9290 Exif Ascii 3 00
Exif.Photo.SubSecTimeOriginal 0x9291 Exif Ascii 3 00
Exif.Photo.SubSecTimeDigitized 0x9292 Exif Ascii 3 00
@ -795,7 +795,7 @@ Exif.Photo.MeteringMode 0x9207 Exif Short 6
Exif.Photo.LightSource 0x9208 Exif Short 1 0
Exif.Photo.Flash 0x9209 Exif Short 1 0
Exif.Photo.FocalLength 0x920a Exif Rational 1 500/10
Exif.Photo.UserComment 0x9286 Exif Undefined 44 65 83 67 73 73 0 0 0 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
Exif.Photo.UserComment 0x9286 Exif Undefined 44 charset="Ascii"
Exif.Photo.SubSecTime 0x9290 Exif Ascii 3 00
Exif.Photo.SubSecTimeOriginal 0x9291 Exif Ascii 3 00
Exif.Photo.SubSecTimeDigitized 0x9292 Exif Ascii 3 00
@ -901,7 +901,7 @@ Exif.Photo.MeteringMode 0x9207 Exif Short 1
Exif.Photo.LightSource 0x9208 Exif Short 1 0
Exif.Photo.Flash 0x9209 Exif Short 1 0
Exif.Photo.FocalLength 0x920a Exif Rational 1 500/10
Exif.Photo.UserComment 0x9286 Exif Undefined 44 65 83 67 73 73 0 0 0 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
Exif.Photo.UserComment 0x9286 Exif Undefined 44 charset="Ascii"
Exif.Photo.SubSecTime 0x9290 Exif Ascii 3 00
Exif.Photo.SubSecTimeOriginal 0x9291 Exif Ascii 3 00
Exif.Photo.SubSecTimeDigitized 0x9292 Exif Ascii 3 00
@ -1006,7 +1006,7 @@ Exif.Photo.MeteringMode 0x9207 Exif Short 1
Exif.Photo.LightSource 0x9208 Exif Short 1 0
Exif.Photo.Flash 0x9209 Exif Short 1 0
Exif.Photo.FocalLength 0x920a Exif Rational 1 500/10
Exif.Photo.UserComment 0x9286 Exif Undefined 44 65 83 67 73 73 0 0 0 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
Exif.Photo.UserComment 0x9286 Exif Undefined 44 charset="Ascii"
Exif.Photo.SubSecTime 0x9290 Exif Ascii 3 00
Exif.Photo.SubSecTimeOriginal 0x9291 Exif Ascii 3 00
Exif.Photo.SubSecTimeDigitized 0x9292 Exif Ascii 3 00

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

@ -7,9 +7,9 @@ Case 1: Non-intrusive change to the standard Exif metadata
---> Reading file test1.jpg
---> Writing Exif thumbnail to file thumb1.*
13c13
< Exif.Photo.DateTimeOriginal 0x9003 2003:12:14 12:01:44
< Exif.Photo.DateTimeOriginal 0x9003 Ascii 20 2003:12:14 12:01:44
---
> Exif.Photo.DateTimeOriginal 0x9003 1999:11:22 00:11:22
> Exif.Photo.DateTimeOriginal 0x9003 Ascii 20 1999:11:22 00:11:22
------------------------------------------------------------
Case 2: Non-intrusive change to the makernote metadata
---> Reading file ./exiv2-canon-powershot-s40.jpg
@ -19,9 +19,9 @@ Case 2: Non-intrusive change to the makernote metadata
---> Reading file test2.jpg
---> Writing Exif thumbnail to file thumb2.*
47c47
< Exif.Canon.OwnerName 0x0009 Andreas Huggel
< Exif.Canon.OwnerName 0x0009 Ascii 32 Andreas Huggel
---
> Exif.Canon.OwnerName 0x0009 Chan YeeSend
> Exif.Canon.OwnerName 0x0009 Ascii 32 Chan YeeSend
------------------------------------------------------------
Case 3: Non-intrusive change to the Exif metadata (w/o makernote)
---> Reading file ./exiv2-kodak-dc210.jpg
@ -31,9 +31,9 @@ Case 3: Non-intrusive change to the Exif metadata (w/o makernote)
---> Reading file test3.jpg
---> Writing Exif thumbnail to file thumb3.*
14c14
< Exif.Photo.DateTimeOriginal 0x9003 2000:10:26 16:46:51
< Exif.Photo.DateTimeOriginal 0x9003 Ascii 20 2000:10:26 16:46:51
---
> Exif.Photo.DateTimeOriginal 0x9003 1999:11:22 00:11:22
> Exif.Photo.DateTimeOriginal 0x9003 Ascii 20 1999:11:22 00:11:22
------------------------------------------------------------
Case 4: Intrusive change to the standard Exif metadata
---> Reading file ./exiv2-canon-powershot-s40.jpg
@ -43,17 +43,17 @@ Case 4: Intrusive change to the standard Exif metadata
---> Reading file test4.jpg
---> Writing Exif thumbnail to file thumb4.*
9c9
< Exif.Image.ExifTag 0x8769 196
< Exif.Image.ExifTag 0x8769 Long 1 196
---
> Exif.Image.ExifTag 0x8769 184
> Exif.Image.ExifTag 0x8769 Long 1 184
13c13
< Exif.Photo.DateTimeOriginal 0x9003 2003:12:14 12:01:44
< Exif.Photo.DateTimeOriginal 0x9003 Ascii 20 2003:12:14 12:01:44
---
> Exif.Photo.DateTimeOriginal 0x9003 1999:11:22 00:11:22 and twenty seconds
> Exif.Photo.DateTimeOriginal 0x9003 Ascii 39 1999:11:22 00:11:22 and twenty seconds
29c29
< Exif.Photo.InteroperabilityTag 0xa005 1416
< Exif.Photo.InteroperabilityTag 0xa005 Long 1 1416
---
> Exif.Photo.InteroperabilityTag 0xa005 1423
> Exif.Photo.InteroperabilityTag 0xa005 Long 1 1423
------------------------------------------------------------
Case 5: Intrusive change to the Canon makernote metadata
---> Reading file ./exiv2-canon-powershot-s40.jpg
@ -63,17 +63,17 @@ Case 5: Intrusive change to the Canon makernote metadata
---> Reading file test5.jpg
---> Writing Exif thumbnail to file thumb5.*
9c9
< Exif.Image.ExifTag 0x8769 196
< Exif.Image.ExifTag 0x8769 Long 1 196
---
> Exif.Image.ExifTag 0x8769 184
> Exif.Image.ExifTag 0x8769 Long 1 184
29c29
< Exif.Photo.InteroperabilityTag 0xa005 1416
< Exif.Photo.InteroperabilityTag 0xa005 Long 1 1416
---
> Exif.Photo.InteroperabilityTag 0xa005 1414
> Exif.Photo.InteroperabilityTag 0xa005 Long 1 1414
47c47
< Exif.Canon.OwnerName 0x0009 Andreas Huggel
< Exif.Canon.OwnerName 0x0009 Ascii 32 Andreas Huggel
---
> Exif.Canon.OwnerName 0x0009 Frau Chan YeeSend und Herr Andreas Huggel
> Exif.Canon.OwnerName 0x0009 Ascii 42 Frau Chan YeeSend und Herr Andreas Huggel
------------------------------------------------------------
Case 6: Intrusive change to the Exif metadata (w/o makernote)
---> Reading file ./exiv2-kodak-dc210.jpg
@ -83,13 +83,13 @@ Case 6: Intrusive change to the Exif metadata (w/o makernote)
---> Reading file test6.jpg
---> Writing Exif thumbnail to file thumb6.*
10c10
< Exif.Image.ExifTag 0x8769 374
< Exif.Image.ExifTag 0x8769 Long 1 374
---
> Exif.Image.ExifTag 0x8769 192
> Exif.Image.ExifTag 0x8769 Long 1 192
14c14
< Exif.Photo.DateTimeOriginal 0x9003 2000:10:26 16:46:51
< Exif.Photo.DateTimeOriginal 0x9003 Ascii 20 2000:10:26 16:46:51
---
> Exif.Photo.DateTimeOriginal 0x9003 1999:11:22 00:11:22 and twenty seconds
> Exif.Photo.DateTimeOriginal 0x9003 Ascii 39 1999:11:22 00:11:22 and twenty seconds
------------------------------------------------------------
Case 7: Intrusive change to the Fujifilm makernote metadata
---> Reading file ./exiv2-fujifilm-finepix-s2pro.jpg
@ -99,17 +99,17 @@ Case 7: Intrusive change to the Fujifilm makernote metadata
---> Reading file test7.jpg
---> Writing Exif thumbnail to file thumb7.*
11c11
< Exif.Image.ExifTag 0x8769 248
< Exif.Image.ExifTag 0x8769 Long 1 248
---
> Exif.Image.ExifTag 0x8769 245
> Exif.Image.ExifTag 0x8769 Long 1 245
33c33
< Exif.Photo.InteroperabilityTag 0xa005 1056
< Exif.Photo.InteroperabilityTag 0xa005 Long 1 1056
---
> Exif.Photo.InteroperabilityTag 0xa005 1070
> Exif.Photo.InteroperabilityTag 0xa005 Long 1 1070
50c50
< Exif.Fujifilm.Quality 0x1000 NORMAL
< Exif.Fujifilm.Quality 0x1000 Ascii 8 NORMAL
---
> Exif.Fujifilm.Quality 0x1000 Typical Fujifilm Quality
> Exif.Fujifilm.Quality 0x1000 Ascii 25 Typical Fujifilm Quality
------------------------------------------------------------
Case 8: Intrusive change to the Sigma makernote metadata
---> Reading file ./exiv2-sigma-d10.jpg
@ -119,13 +119,13 @@ Case 8: Intrusive change to the Sigma makernote metadata
---> Reading file test8.jpg
---> Writing Exif thumbnail to file thumb8.*
10c10
< Exif.Image.ExifTag 0x8769 12317
< Exif.Image.ExifTag 0x8769 Long 1 12317
---
> Exif.Image.ExifTag 0x8769 213
> Exif.Image.ExifTag 0x8769 Long 1 213
38c38
< Exif.Sigma.ResolutionMode 0x0004 HI
< Exif.Sigma.ResolutionMode 0x0004 Ascii 3 HI
---
> Exif.Sigma.ResolutionMode 0x0004 Sigma HI resolution
> Exif.Sigma.ResolutionMode 0x0004 Ascii 20 Sigma HI resolution
------------------------------------------------------------
Case 9: Intrusive change to the Nikon1 makernote metadata
---> Reading file ./exiv2-nikon-e990.jpg
@ -135,17 +135,17 @@ Case 9: Intrusive change to the Nikon1 makernote metadata
---> Reading file test9.jpg
---> Writing Exif thumbnail to file thumb9.*
11c11
< Exif.Image.ExifTag 0x8769 284
< Exif.Image.ExifTag 0x8769 Long 1 284
---
> Exif.Image.ExifTag 0x8769 213
> Exif.Image.ExifTag 0x8769 Long 1 213
32c32
< Exif.Photo.InteroperabilityTag 0xa005 886
< Exif.Photo.InteroperabilityTag 0xa005 Long 1 886
---
> Exif.Photo.InteroperabilityTag 0xa005 1214
> Exif.Photo.InteroperabilityTag 0xa005 Long 1 1214
38c38
< Exif.Nikon1.Quality 0x0004 FINE
< Exif.Nikon1.Quality 0x0004 Ascii 7 FINE
---
> Exif.Nikon1.Quality 0x0004 Typical Nikon1 Quality
> Exif.Nikon1.Quality 0x0004 Ascii 23 Typical Nikon1 Quality
------------------------------------------------------------
Case 10: Intrusive change to the Nikon2 makernote metadata
---> Reading file ./exiv2-nikon-e950.jpg
@ -155,17 +155,17 @@ Case 10: Intrusive change to the Nikon2 makernote metadata
---> Reading file test10.jpg
---> Writing Exif thumbnail to file thumb10.*
11c11
< Exif.Image.ExifTag 0x8769 284
< Exif.Image.ExifTag 0x8769 Long 1 284
---
> Exif.Image.ExifTag 0x8769 212
> Exif.Image.ExifTag 0x8769 Long 1 212
32c32
< Exif.Photo.InteroperabilityTag 0xa005 886
< Exif.Photo.InteroperabilityTag 0xa005 Long 1 886
---
> Exif.Photo.InteroperabilityTag 0xa005 1038
> Exif.Photo.InteroperabilityTag 0xa005 Long 1 1038
35c35
< Exif.Nikon2.0x0002 0x0002 08.00
< Exif.Nikon2.0x0002 0x0002 Ascii 6 08.00
---
> Exif.Nikon2.0x0002 0x0002 Nikon2 Version 2
> Exif.Nikon2.0x0002 0x0002 Ascii 17 Nikon2 Version 2
------------------------------------------------------------
Case 11: Intrusive change to the Nikon3 makernote metadata
---> Reading file ./exiv2-nikon-d70.jpg
@ -175,14 +175,14 @@ Case 11: Intrusive change to the Nikon3 makernote metadata
---> Reading file test11.jpg
---> Writing Exif thumbnail to file thumb11.*
13c13
< Exif.Image.ExifTag 0x8769 340
< Exif.Image.ExifTag 0x8769 Long 1 340
---
> Exif.Image.ExifTag 0x8769 332
> Exif.Image.ExifTag 0x8769 Long 1 332
36c36
< Exif.Photo.InteroperabilityTag 0xa005 30306
< Exif.Photo.InteroperabilityTag 0xa005 Long 1 30306
---
> Exif.Photo.InteroperabilityTag 0xa005 2402
> Exif.Photo.InteroperabilityTag 0xa005 Long 1 2402
55c55
< Exif.Nikon3.Quality 0x0004 FINE
< Exif.Nikon3.Quality 0x0004 Ascii 8 FINE
---
> Exif.Nikon3.Quality 0x0004 Typical Nikon3 Quality
> Exif.Nikon3.Quality 0x0004 Ascii 23 Typical Nikon3 Quality

File diff suppressed because it is too large Load Diff

@ -25,7 +25,7 @@ runTestCase()
$binpath/exifprint $rtc_infile > $datapath/iii;
cp $rtc_infile $rtc_outfile;
$binpath/write-test $rtc_infile $rtc_number > $datapath/ttt;
diff $datapath/iii $datapath/ttt
diff -a $datapath/iii $datapath/ttt
}
# **********************************************************************
@ -68,10 +68,10 @@ runTestCase 11 $datapath/exiv2-nikon-d70.jpg
) > tmp/write-test.out 2>&1
diff -q -w $diffargs tmp/write-test.out data/write-test.out
diff -q -w -a $diffargs tmp/write-test.out data/write-test.out
rc=$?
if [ $rc -eq 0 ] ; then
echo "All testcases passed."
else
diff -w $diffargs tmp/write-test.out data/write-test.out
diff -w -a $diffargs tmp/write-test.out data/write-test.out
fi

Loading…
Cancel
Save