diff --git a/libvips/foreign/vips2tiff.c b/libvips/foreign/vips2tiff.c index a53ac4f7..0f26105a 100644 --- a/libvips/foreign/vips2tiff.c +++ b/libvips/foreign/vips2tiff.c @@ -822,12 +822,12 @@ wtiff_write_header( Wtiff *wtiff, Layer *layer ) else TIFFSetField( tif, TIFFTAG_ROWSPERSTRIP, wtiff->tileh ); + if( layer->above ) /* Pyramid layer. */ TIFFSetField( tif, TIFFTAG_SUBFILETYPE, FILETYPE_REDUCEDIMAGE ); - - if( wtiff->toilet_roll ) { + else if( wtiff->toilet_roll ) { /* One page of many. */ TIFFSetField( tif, TIFFTAG_SUBFILETYPE, FILETYPE_PAGE ); @@ -836,6 +836,7 @@ wtiff_write_header( Wtiff *wtiff, Layer *layer ) wtiff->page_number, wtiff->n_pages ); } + /* Sample format. * * Don't set for logluv: libtiff does this for us.