add some tests for subifd pyramids

fix a problem with jpg-compressed tiffs too
This commit is contained in:
John Cupitt 2020-06-02 18:08:34 +01:00
parent d74fe71764
commit 6d5a371147
2 changed files with 11 additions and 0 deletions

View File

@ -657,6 +657,13 @@ rtiff_set_page( Rtiff *rtiff, int page )
}
rtiff->current_page = page;
/* This can get unset when we change directories. Make sure
* it's set again.
*/
if( rtiff->header.compression == COMPRESSION_JPEG )
TIFFSetField( rtiff->tiff,
TIFFTAG_JPEGCOLORMODE, JPEGCOLORMODE_RGB );
}
return( 0 );

View File

@ -340,8 +340,12 @@ class TestForeign:
self.colour, 0)
self.save_load_file(".tif", "[tile]", self.colour, 0)
self.save_load_file(".tif", "[tile,pyramid]", self.colour, 0)
self.save_load_file(".tif", "[tile,pyramid,subifd]", self.colour, 0)
self.save_load_file(".tif",
"[tile,pyramid,compression=jpeg]", self.colour, 80)
self.save_load_file(".tif",
"[tile,pyramid,subifd,compression=jpeg]",
self.colour, 80)
self.save_load_file(".tif", "[bigtiff]", self.colour, 0)
self.save_load_file(".tif", "[compression=jpeg]", self.colour, 80)
self.save_load_file(".tif",