Inverted order of TIFF tag writing when saving multi-page subifd pyramids (#3047)
* Inverted order of TIFF tag writing when saving multi-page subifd pyramids to ensure that subifd pyramid layers are correctly tagged as reduced-image subfile type and not as pages * Use if-else clause to avoid tag overwriting
This commit is contained in:
parent
3081821636
commit
4985fec6b4
@ -822,12 +822,12 @@ wtiff_write_header( Wtiff *wtiff, Layer *layer )
|
|||||||
else
|
else
|
||||||
TIFFSetField( tif, TIFFTAG_ROWSPERSTRIP, wtiff->tileh );
|
TIFFSetField( tif, TIFFTAG_ROWSPERSTRIP, wtiff->tileh );
|
||||||
|
|
||||||
|
|
||||||
if( layer->above )
|
if( layer->above )
|
||||||
/* Pyramid layer.
|
/* Pyramid layer.
|
||||||
*/
|
*/
|
||||||
TIFFSetField( tif, TIFFTAG_SUBFILETYPE, FILETYPE_REDUCEDIMAGE );
|
TIFFSetField( tif, TIFFTAG_SUBFILETYPE, FILETYPE_REDUCEDIMAGE );
|
||||||
|
else if( wtiff->toilet_roll ) {
|
||||||
if( wtiff->toilet_roll ) {
|
|
||||||
/* One page of many.
|
/* One page of many.
|
||||||
*/
|
*/
|
||||||
TIFFSetField( tif, TIFFTAG_SUBFILETYPE, FILETYPE_PAGE );
|
TIFFSetField( tif, TIFFTAG_SUBFILETYPE, FILETYPE_PAGE );
|
||||||
@ -836,6 +836,7 @@ wtiff_write_header( Wtiff *wtiff, Layer *layer )
|
|||||||
wtiff->page_number, wtiff->n_pages );
|
wtiff->page_number, wtiff->n_pages );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Sample format.
|
/* Sample format.
|
||||||
*
|
*
|
||||||
* Don't set for logluv: libtiff does this for us.
|
* Don't set for logluv: libtiff does this for us.
|
||||||
|
Loading…
Reference in New Issue
Block a user