@@ -668,10 +668,10 @@ PyImaging_LibTiffEncoderNew(PyObject *self, PyObject *args) {
668668 int key_int , status , is_core_tag , is_var_length , num_core_tags , i ;
669669 TIFFDataType type = TIFF_NOTYPE ;
670670 // This list also exists in TiffTags.py
671- const int core_tags [] = {256 , 257 , 258 , 259 , 262 , 263 , 266 , 269 , 274 ,
672- 277 , 278 , 280 , 281 , 340 , 341 , 282 , 283 , 284 ,
673- 286 , 287 , 296 , 297 , 320 , 321 , 338 , 32995 , 32998 ,
674- 32996 , 339 , 32997 , 330 , 531 , 530 , 65537 , 301 , 532 };
671+ const int core_tags [] = {256 , 257 , 258 , 259 , 262 , 263 , 266 , 269 , 274 , 277 ,
672+ 278 , 280 , 281 , 282 , 283 , 284 , 286 , 287 , 296 , 297 ,
673+ 301 , 320 , 321 , 330 , 333 , 338 , 339 , 340 , 341 , 530 ,
674+ 531 , 532 , 32995 , 32996 , 32997 , 32998 , 65537 };
675675
676676 Py_ssize_t tags_size ;
677677 PyObject * item ;
@@ -821,7 +821,8 @@ PyImaging_LibTiffEncoderNew(PyObject *self, PyObject *args) {
821821 }
822822 }
823823
824- if (type == TIFF_BYTE || type == TIFF_UNDEFINED ) {
824+ if (type == TIFF_BYTE || type == TIFF_UNDEFINED ||
825+ key_int == TIFFTAG_INKNAMES ) {
825826 status = ImagingLibTiffSetField (
826827 & encoder -> state ,
827828 (ttag_t )key_int ,
0 commit comments