# HG changeset patch # User magedrifaat # Date 1662082865 -7200 # Node ID 4e8152ccc61aa972d4a2fa8e2dc72506b82aaea3 # Parent 30b28458bb06f95728fe5cb0ed2374d092c70a69 libtinterp/corefcn/__tiff__.cc (set_field_data): fixed bug for ExtraSamples. diff -r 30b28458bb06 -r 4e8152ccc61a libinterp/corefcn/__tiff__.cc --- a/libinterp/corefcn/__tiff__.cc Fri Sep 02 03:30:45 2022 +0200 +++ b/libinterp/corefcn/__tiff__.cc Fri Sep 02 03:41:05 2022 +0200 @@ -1605,9 +1605,8 @@ error ("Failed to obtain the number of samples per pixel"); uint16NDArray data_array = tag_ov.uint16_array_value (); - // FIXME: this only works for RGB images. Need to handle grayscale, - // palette, cmyk and ycbcr - if (data_array.numel () > samples_per_pixel - 3) + + if (data_array.numel () > samples_per_pixel) error ("Failed to set field, too many values"); if (! TIFFSetField (tif, tag_id,