# HG changeset patch # User magedrifaat # Date 1656986110 -7200 # Node ID f5a88c0a61abd138caa7c6becc499bc6109b864e # Parent 7c5b8a294f6029224822ec67086bb899320c55bd Support for GrayResponseCurve and GrayResponseUnit tags * __tiff__.cc: Handled GrayResponseCurve and GrayResponseUnit tags according to the format specification. diff -r 7c5b8a294f60 -r f5a88c0a61ab libinterp/dldfcn/__tiff__.cc --- a/libinterp/dldfcn/__tiff__.cc Tue Jul 05 03:44:41 2022 +0200 +++ b/libinterp/dldfcn/__tiff__.cc Tue Jul 05 03:55:10 2022 +0200 @@ -117,7 +117,6 @@ octave_value_list interpret_data (void *data, uint32_t count, TIFFDataType tag_datatype) { - // TODO(maged): Find the correct way fo returning multivalues octave_value_list ovl_data; // Apparently matlab converts scalar numerical values into double // but doesn't do the same for arrays @@ -328,6 +327,15 @@ case TIFFTAG_REFERENCEBLACKWHITE: tag_data_ovl = get_array_field_data (tif, fip, 6); break; + case TIFFTAG_GRAYRESPONSECURVE: + { + uint16_t bits_per_sample; + if (! TIFFGetField (tif, TIFFTAG_BITSPERSAMPLE, &bits_per_sample)) + error ("Failed to obtain the bit depth"); + + tag_data_ovl = get_array_field_data (tif, fip, 1<