Pretty print PlanarConfig

main
Miloš Komarčević 5 years ago
parent 866d213983
commit 5e7a563407

@ -190,6 +190,12 @@ namespace Exiv2 {
{ 8, N_("left, bottom") } // To silence compiler warning
};
//! PlanarConfiguration, tag 0x011c
extern const TagDetails exifPlanarConfiguration[] = {
{ 1, N_("Chunky") },
{ 2, N_("Planar") }
};
//! Predictor, tag 0x013d
extern const TagDetails exifPredictor[] = {
{ 1, N_("No prediction scheme used") },
@ -585,7 +591,7 @@ namespace Exiv2 {
"or planar format. In JPEG compressed files a JPEG marker "
"is used instead of this tag. If this field does not exist, "
"the TIFF default of 1 (chunky) is assumed."),
ifd0Id, imgStruct, unsignedShort, 1, printValue),
ifd0Id, imgStruct, unsignedShort, 1, EXV_PRINT_TAG(exifPlanarConfiguration)),
TagInfo(0x0122, "GrayResponseUnit", N_("Gray Response Unit"),
N_("The precision of the information contained in the GrayResponseCurve."),
ifd0Id, imgStruct, unsignedShort, 1, printValue), // TIFF tag

@ -14,7 +14,7 @@ RowsPerStrip Short 1 "64"
StripByteCounts Long 1 "243"
XResolution Rational 1 "72"
YResolution Rational 1 "72"
PlanarConfiguration Short 1 "1"
PlanarConfiguration Short 1 "Chunky"
ResolutionUnit Short 1 "inch"
exiv2 -pS output
@ -99,7 +99,7 @@ RowsPerStrip Short 1 "64"
StripByteCounts Long 1 "243"
XResolution Rational 1 "72"
YResolution Rational 1 "72"
PlanarConfiguration Short 1 "1"
PlanarConfiguration Short 1 "Chunky"
ResolutionUnit Short 1 "inch"
ExifTag Long 1 "294"
DateTimeOriginal Ascii 18 "Yesterday at noon"

@ -35,7 +35,7 @@ Exif.Image.RowsPerStrip Short 1 64
Exif.Image.StripByteCounts Long 1 243
Exif.Image.XResolution Rational 1 72
Exif.Image.YResolution Rational 1 72
Exif.Image.PlanarConfiguration Short 1 1
Exif.Image.PlanarConfiguration Short 1 Chunky
Exif.Image.ResolutionUnit Short 1 inch
"""
]

@ -92,7 +92,7 @@ class OutputTagExtract(metaclass=system_tests.CaseMeta):
if pa_elem["tag"] in [
"ImageWidth", "ImageLength", "BitsPerSample",
"DocumentName", "ImageDescription", "StripOffsets",
"SamplesPerPixel", "StripByteCounts", "PlanarConfiguration"]:
"SamplesPerPixel", "StripByteCounts"]:
self.assertEquals(pa_elem["val"], pS_elem["val"])
def compare_stdout(self, i, command, got_stdout, expected_stdout):
@ -128,7 +128,7 @@ Exif.Image.RowsPerStrip Short 1 64
Exif.Image.StripByteCounts Long 1 243
Exif.Image.XResolution Rational 1 72
Exif.Image.YResolution Rational 1 72
Exif.Image.PlanarConfiguration Short 1 1
Exif.Image.PlanarConfiguration Short 1 Chunky
Exif.Image.ResolutionUnit Short 1 inch
""",
"""STRUCTURE OF TIFF FILE (II): $data_path/mini9.tif

Loading…
Cancel
Save