# HG changeset patch # User magedrifaat # Date 1658007615 -7200 # Node ID 530dbd1d6b07346465c865eb3adc9035adcd585a # Parent 9b3685afb4e7941db9ab0ab1cf04cc46996054cd Tiff getTag: fixed bug for multivalued tags where only first item is returned * __tiff__.cc(get_field_data): fixed bug for multivalued tags where only the first element is returned. diff -r 9b3685afb4e7 -r 530dbd1d6b07 libinterp/dldfcn/__tiff__.cc --- a/libinterp/dldfcn/__tiff__.cc Sat Jul 16 21:02:07 2022 +0200 +++ b/libinterp/dldfcn/__tiff__.cc Sat Jul 16 23:40:15 2022 +0200 @@ -438,10 +438,10 @@ return interpret_tag_data (data, array_size, TIFFFieldDataType (fip)); } - octave_value_list + octave_value get_field_data (TIFF *tif, const TIFFField *fip) { - octave_value_list tag_data_ovl (1); + octave_value tag_data_ov; uint32_t tag_id = TIFFFieldTag (fip); // TODO(maged): find/create images to test the special tags @@ -449,18 +449,18 @@ { case TIFFTAG_STRIPBYTECOUNTS: case TIFFTAG_STRIPOFFSETS: - tag_data_ovl = get_array_field_data (tif, fip, + tag_data_ov = get_array_field_data (tif, fip, TIFFNumberOfStrips (tif)); break; case TIFFTAG_TILEBYTECOUNTS: case TIFFTAG_TILEOFFSETS: - tag_data_ovl = get_array_field_data (tif, fip, TIFFNumberOfTiles (tif)); + tag_data_ov = get_array_field_data (tif, fip, TIFFNumberOfTiles (tif)); break; case TIFFTAG_YCBCRCOEFFICIENTS: - tag_data_ovl = get_array_field_data (tif, fip, 3); + tag_data_ov = get_array_field_data (tif, fip, 3); break; case TIFFTAG_REFERENCEBLACKWHITE: - tag_data_ovl = get_array_field_data (tif, fip, 6); + tag_data_ov = get_array_field_data (tif, fip, 6); break; case TIFFTAG_GRAYRESPONSECURVE: { @@ -468,7 +468,7 @@ 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<