comparison libinterp/dldfcn/__tiff__.cc @ 31103:76b21bed2920

Undocumented and unimplemented tags are explicilty mentioned and handled * __tiff__.cc: Comlpex unimplemented tags now give an error message and tags that are undocumented are explicitly mentioned.
author magedrifaat <magedrifaat@gmail.com>
date Sun, 03 Jul 2022 22:51:08 +0200
parents d6ecf0e8838b
children b5d59c115e52
comparison
equal deleted inserted replaced
31102:d6ecf0e8838b 31103:76b21bed2920
321 uint16_t *types; 321 uint16_t *types;
322 validate_tiff_get_field (TIFFGetField (tif, tag_id, &count, &types)); 322 validate_tiff_get_field (TIFFGetField (tif, tag_id, &count, &types));
323 tag_data_ovl = interpret_data (types, count, TIFFFieldDataType (fip)); 323 tag_data_ovl = interpret_data (types, count, TIFFFieldDataType (fip));
324 break; 324 break;
325 } 325 }
326 // TODO(maged): Do I just return bytes? pass it to some parser lib? 326 // TODO(maged): These tags are more complex to implement
327 // will be implemented and tested later.
327 case TIFFTAG_XMLPACKET: 328 case TIFFTAG_XMLPACKET:
328 case TIFFTAG_RICHTIFFIPTC: 329 case TIFFTAG_RICHTIFFIPTC:
329 case TIFFTAG_PHOTOSHOP: 330 case TIFFTAG_PHOTOSHOP:
330 case TIFFTAG_ICCPROFILE: 331 case TIFFTAG_ICCPROFILE:
331 { 332 {
332 uint16_t count; 333 error ("Complex Tags not implemented");
333 void *data; 334 break;
334 validate_tiff_get_field (TIFFGetField (tif, tag_id, &count, &data)); 335 }
335 tag_data_ovl = interpret_data (data, count, TIFF_BYTE); 336 // Those two tags are not mentioned in the LibTIFF documentation
337 // but are handled correctly by the library
338 case TIFFTAG_ZIPQUALITY:
339 case TIFFTAG_SGILOGDATAFMT:
340 {
341 tag_data_ovl = get_scalar_field_data (tif, fip);
336 break; 342 break;
337 } 343 }
338 default: 344 default:
339 tag_data_ovl = get_scalar_field_data (tif, fip); 345 tag_data_ovl = get_scalar_field_data (tif, fip);
340 } 346 }