Make TIFFTAG_CFAPATTERN variable count

The TIFFTAG_CFAPATTERN tag (33422) from TIFF/EP, recently introduced in libtiff
3363eda09d / http://bugzilla.maptools.org/show_bug.cgi?id=2457
is described as having a fixed count of 4.
But the TIFF/EP spec says this should support a variable count (= CFARepeatRows * CFARepeatCols):

TIFF/EP, ISO 12234-2:2001
http://www.barrypearson.co.uk/top2009/downloads/TAG2000-22_DIS12234-2.pdf
page 18 and 26
This commit is contained in:
Sam Hasinoff 2020-03-08 21:23:16 +01:00 committed by Thomas Bernard
parent e95584d3b8
commit 2eb5a954cb
No known key found for this signature in database
GPG Key ID: 0FF11B67A5C0863C

View File

@ -145,7 +145,7 @@ tiffFields[] = {
{ TIFFTAG_PIXAR_MATRIX_WORLDTOSCREEN, 16, 16, TIFF_FLOAT, 0, TIFF_SETGET_C0_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "MatrixWorldToScreen", NULL },
{ TIFFTAG_PIXAR_MATRIX_WORLDTOCAMERA, 16, 16, TIFF_FLOAT, 0, TIFF_SETGET_C0_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "MatrixWorldToCamera", NULL },
{ TIFFTAG_CFAREPEATPATTERNDIM, 2, 2, TIFF_SHORT, 0, TIFF_SETGET_C0_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "CFARepeatPatternDim", NULL },
{ TIFFTAG_CFAPATTERN, 4, 4, TIFF_BYTE, 0, TIFF_SETGET_C0_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "CFAPattern" , NULL},
{ TIFFTAG_CFAPATTERN, -1, -1, TIFF_BYTE, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "CFAPattern" , NULL},
{ TIFFTAG_COPYRIGHT, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Copyright", NULL },
/* end Pixar tags */
{ TIFFTAG_RICHTIFFIPTC, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "RichTIFFIPTC", NULL },