Skip to content

Commit

Permalink
Merge pull request #1548 from Exiv2/add_exif_gamma
Browse files Browse the repository at this point in the history
Add Exif Gamma tag

(cherry picked from commit 6cb3402)
  • Loading branch information
kmilos committed Jul 1, 2021
1 parent 3ba91fd commit 8120ff7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
5 changes: 5 additions & 0 deletions src/tags_int.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2081,6 +2081,11 @@ namespace Exiv2 {
TagInfo(0xa462, "SourceExposureTimesOfCompositeImage", N_("Source Exposure Times Of Composite Image"),
N_("For a composite image, records the parameters relating exposure time of the exposures for generating the said composite image, such as respective exposure times of captured source images (tentatively recorded images)."),
exifId, captureCond, undefined, 0, printValue), // Exif 2.32
TagInfo(0xa500, "Gamma", N_("Gamma"),
N_("Indicates the value of coefficient gamma. The formula of transfer function used for image reproduction "
"is expressed as follows: (reproduced value) = (input value)^gamma. Both reproduced value and input value "
"indicate normalized value, whose minimum value is 0 and maximum value is 1."),
exifId, imgCharacter, unsignedRational, 1, printFloat),
// End of list marker
TagInfo(0xffff, "(UnknownExifTag)", N_("Unknown Exif tag"),
N_("Unknown Exif tag"),
Expand Down
8 changes: 4 additions & 4 deletions test/data/exifdata-test.out
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ Exif.Photo.Contrast 0xa408 Exif Short 1
Exif.Photo.Saturation 0xa409 Exif Short 1 0
Exif.Photo.Sharpness 0xa40a Exif Short 1 0
Exif.Photo.SubjectDistanceRange 0xa40c Exif Short 1 0
Exif.Photo.0xa500 0xa500 Exif Rational 1 22/10
Exif.Photo.Gamma 0xa500 Exif Rational 1 22/10
Exif.Thumbnail.Compression 0x0103 IFD1 Short 1 6
Exif.Thumbnail.XResolution 0x011a IFD1 Rational 1 300/1
Exif.Thumbnail.YResolution 0x011b IFD1 Rational 1 300/1
Expand Down Expand Up @@ -1016,7 +1016,7 @@ Exif.Photo.Contrast 0xa408 Exif Short 1
Exif.Photo.Saturation 0xa409 Exif Short 1 0
Exif.Photo.Sharpness 0xa40a Exif Short 1 0
Exif.Photo.SubjectDistanceRange 0xa40c Exif Short 1 0
Exif.Photo.0xa500 0xa500 Exif Rational 1 22/10
Exif.Photo.Gamma 0xa500 Exif Rational 1 22/10
Exif.Thumbnail.Compression 0x0103 IFD1 Short 1 6
Exif.Thumbnail.Orientation 0x0112 IFD1 Short 5 2 3 4 5 6
Exif.Thumbnail.XResolution 0x011a IFD1 Rational 1 300/1
Expand Down Expand Up @@ -1188,7 +1188,7 @@ Exif.Photo.Contrast 0xa408 Exif Short 1
Exif.Photo.Saturation 0xa409 Exif Short 1 0
Exif.Photo.Sharpness 0xa40a Exif Short 1 0
Exif.Photo.SubjectDistanceRange 0xa40c Exif Short 1 0
Exif.Photo.0xa500 0xa500 Exif Rational 1 22/10
Exif.Photo.Gamma 0xa500 Exif Rational 1 22/10
Exif.Thumbnail.Compression 0x0103 IFD1 Short 1 6
Exif.Thumbnail.Orientation 0x0112 IFD1 Short 1 2
Exif.Thumbnail.XResolution 0x011a IFD1 Rational 1 300/1
Expand Down Expand Up @@ -1360,7 +1360,7 @@ Exif.Photo.Contrast 0xa408 Exif Short 1
Exif.Photo.Saturation 0xa409 Exif Short 1 0
Exif.Photo.Sharpness 0xa40a Exif Short 1 0
Exif.Photo.SubjectDistanceRange 0xa40c Exif Short 1 0
Exif.Photo.0xa500 0xa500 Exif Rational 1 22/10
Exif.Photo.Gamma 0xa500 Exif Rational 1 22/10
Exif.Thumbnail.Compression 0x0103 IFD1 Short 1 6
Exif.Thumbnail.Orientation 0x0112 IFD1 Short 1 2
Exif.Thumbnail.XResolution 0x011a IFD1 Rational 1 300/1
Expand Down
10 changes: 5 additions & 5 deletions test/data/exiv2-test.out
Original file line number Diff line number Diff line change
Expand Up @@ -976,7 +976,7 @@ File 4/16: 20040329_224245.jpg
20040329_224245.jpg Exif.Photo.Saturation Short 1 Normal
20040329_224245.jpg Exif.Photo.Sharpness Short 1 Normal
20040329_224245.jpg Exif.Photo.SubjectDistanceRange Short 1 Unknown
20040329_224245.jpg Exif.Photo.0xa500 Rational 1 22/10
20040329_224245.jpg Exif.Photo.Gamma Rational 1 2.2
20040329_224245.jpg Exif.Thumbnail.Compression Short 1 JPEG (old-style)
20040329_224245.jpg Exif.Thumbnail.XResolution Rational 1 300
20040329_224245.jpg Exif.Thumbnail.YResolution Rational 1 300
Expand Down Expand Up @@ -2617,7 +2617,7 @@ Compare image data and extracted data ------------------------------------
< 20040329_224245.jpg Exif.Photo.Saturation Short 1 Normal
< 20040329_224245.jpg Exif.Photo.Sharpness Short 1 Normal
< 20040329_224245.jpg Exif.Photo.SubjectDistanceRange Short 1 Unknown
< 20040329_224245.jpg Exif.Photo.0xa500 Rational 1 22/10
< 20040329_224245.jpg Exif.Photo.Gamma Rational 1 2.2
< 20040329_224245.jpg Exif.Thumbnail.Compression Short 1 JPEG (old-style)
< 20040329_224245.jpg Exif.Thumbnail.XResolution Rational 1 300
< 20040329_224245.jpg Exif.Thumbnail.YResolution Rational 1 300
Expand Down Expand Up @@ -4180,7 +4180,7 @@ Compare image data and extracted data ------------------------------------
> 20040329_224245.exv Exif.Photo.Saturation Short 1 Normal
> 20040329_224245.exv Exif.Photo.Sharpness Short 1 Normal
> 20040329_224245.exv Exif.Photo.SubjectDistanceRange Short 1 Unknown
> 20040329_224245.exv Exif.Photo.0xa500 Rational 1 22/10
> 20040329_224245.exv Exif.Photo.Gamma Rational 1 2.2
> 20040329_224245.exv Exif.Thumbnail.Compression Short 1 JPEG (old-style)
> 20040329_224245.exv Exif.Thumbnail.XResolution Rational 1 300
> 20040329_224245.exv Exif.Thumbnail.YResolution Rational 1 300
Expand Down Expand Up @@ -5981,7 +5981,7 @@ Compare original and inserted image data ---------------------------------
< 20040329_224245.jpg Exif.Photo.Saturation Short 1 Normal
< 20040329_224245.jpg Exif.Photo.Sharpness Short 1 Normal
< 20040329_224245.jpg Exif.Photo.SubjectDistanceRange Short 1 Unknown
< 20040329_224245.jpg Exif.Photo.0xa500 Rational 1 22/10
< 20040329_224245.jpg Exif.Photo.Gamma Rational 1 2.2
< 20040329_224245.jpg Exif.Thumbnail.Compression Short 1 JPEG (old-style)
< 20040329_224245.jpg Exif.Thumbnail.XResolution Rational 1 300
< 20040329_224245.jpg Exif.Thumbnail.YResolution Rational 1 300
Expand Down Expand Up @@ -7544,7 +7544,7 @@ Compare original and inserted image data ---------------------------------
> 20040329_224245.exv Exif.Photo.Saturation Short 1 Normal
> 20040329_224245.exv Exif.Photo.Sharpness Short 1 Normal
> 20040329_224245.exv Exif.Photo.SubjectDistanceRange Short 1 Unknown
> 20040329_224245.exv Exif.Photo.0xa500 Rational 1 22/10
> 20040329_224245.exv Exif.Photo.Gamma Rational 1 2.2
> 20040329_224245.exv Exif.Thumbnail.Compression Short 1 JPEG (old-style)
> 20040329_224245.exv Exif.Thumbnail.XResolution Rational 1 300
> 20040329_224245.exv Exif.Thumbnail.YResolution Rational 1 300
Expand Down

0 comments on commit 8120ff7

Please sign in to comment.